8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Samples/Game2/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Samples/Game2/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.openatlas.android.game2"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.00x7a"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/Samples/Game2/app/build.gradle~:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.taobao.android.game20x7a"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.00x6d"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/Samples/Game2/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/BunnyBlue/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/androidTest/java/com/taobao/android/game20x6f/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.taobao.android.game20x6f;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
26 |
27 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/AndroidManifest.xml~:
--------------------------------------------------------------------------------
1 |
7 |
8 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
26 |
27 |
28 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/java/com/openatlas/android/game2/GameReceiver.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.android.game2;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | import com.openatlas.android.game2.download.GcAppDownLoadService;
8 |
9 | public class GameReceiver extends BroadcastReceiver {
10 | public GameReceiver() {
11 | }
12 |
13 | @Override
14 | public void onReceive(Context context, Intent intent) {
15 | // TODO: This method is called when the BroadcastReceiver is receiving
16 | // an Intent broadcast.
17 | System.out.println("GameReceiver.onReceive()"+intent.getStringExtra("msg"));
18 | Intent intent2 = new Intent(context, GcAppDownLoadService.class);
19 | context.startService(intent2);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/java/com/openatlas/android/game2/GameStaticReceiver.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.android.game2;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 |
7 | public class GameStaticReceiver extends BroadcastReceiver {
8 | public GameStaticReceiver() {
9 | }
10 |
11 | @Override
12 | public void onReceive(Context context, Intent intent) {
13 | // TODO: This method is called when the BroadcastReceiver is receiving
14 | // an Intent broadcast.
15 | System.out.println("GameStaticReceiver.onReceive()"+intent.getStringExtra("msg"));
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/java/com/openatlas/android/game2/download/GcAppDownLoadService.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.android.game2.download;
2 |
3 | import android.app.Service;
4 | import android.content.Intent;
5 | import android.os.Binder;
6 | import android.os.IBinder;
7 |
8 | public class GcAppDownLoadService extends Service {
9 | class BindImpl extends Binder{
10 |
11 | }
12 | @Override
13 | public void onCreate() {
14 | System.out.println("GcAppDownLoadService.onCreate()");
15 | super.onCreate();
16 | }
17 |
18 | @Override
19 | public IBinder onBind(Intent intent) {
20 | System.out.println("GcAppDownLoadService.onBind()");
21 | return new BindImpl();
22 | }
23 | @Override
24 | public int onStartCommand(Intent intent, int flags, int startId) {
25 | System.out.println("GcAppDownLoadService.onStartCommand()");
26 | return super.onStartCommand(intent, flags, startId);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/java/com/openatlas/android/game2/main/ActivityInternalActivity.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.android.game2.main;
2 |
3 | import android.app.Activity;
4 | import android.content.ContentValues;
5 | import android.database.Cursor;
6 | import android.net.Uri;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.view.View.OnClickListener;
10 | import android.widget.Button;
11 |
12 | import com.openatlas.android.game2.GameProvider;
13 | import com.openatlas.android.game2.R;
14 |
15 |
16 | public class ActivityInternalActivity extends Activity {
17 | Button btnInsert;
18 | Button btnQuery;
19 | @Override
20 | protected void onCreate(Bundle savedInstanceState) {
21 | super.onCreate(savedInstanceState);
22 | setContentView(R.layout.activity_internal);
23 | btnInsert=(Button) findViewById(R.id.btnInsert);
24 | btnQuery=(Button) findViewById(R.id.btnQuery);
25 | btnInsert.setOnClickListener(new OnClickListener() {
26 |
27 | @Override
28 | public void onClick(View v) {
29 | insertRecord("uname"+System.currentTimeMillis());
30 |
31 | }
32 | });
33 | btnQuery.setOnClickListener(new OnClickListener() {
34 |
35 | @Override
36 | public void onClick(View v) {
37 | displayRecords();
38 |
39 | }
40 | });
41 | }
42 |
43 |
44 | private void insertRecord(String userName) {
45 | ContentValues values = new ContentValues();
46 | values.put("USER_NAME", userName);
47 | getContentResolver().insert(GameProvider.AppProviderURI, values);
48 | }
49 | private void displayRecords() {
50 | String columns[] = new String[] { "_id","USER_NAME" };
51 | Uri myUri = GameProvider.AppProviderURI;
52 | Cursor cur = managedQuery(myUri, columns,null, null, null );
53 | if (cur.moveToFirst()) {
54 | String id = null;
55 | String userName = null;
56 | do {
57 | id = cur.getString(cur.getColumnIndex("_id"));
58 | userName = cur.getString(cur.getColumnIndex("USER_NAME"));
59 | System.out.println("ActivityInternalActivity.displayRecords() id "+id+" uname "+userName);
60 | } while (cur.moveToNext());
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/java/com/openatlas/android/game2/utils/package-info.java:
--------------------------------------------------------------------------------
1 | /**OpenAtlasForAndroid Project
2 |
3 | The MIT License (MIT)
4 | Copyright (c) 2015 Bunny Blue
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7 | and associated documentation files (the "Software"), to deal in the Software
8 | without restriction, including without limitation the rights to use, copy, modify,
9 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all copies
13 | or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
18 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | @author BunnyBlue
21 | * **/
22 | /**
23 | * @author BunnyBlue
24 | *
25 | */
26 | package com.taobao.android.game2.utils;
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/layout/activity_internal.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
13 |
14 |
19 |
20 |
25 |
26 |
31 |
32 |
37 |
38 |
43 |
44 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Game2/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Game2/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Game2/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Game2/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Game2
3 |
4 |
--------------------------------------------------------------------------------
/Samples/Game2/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Samples/Game2/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.+'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/Game2/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/Samples/Game2/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Game2/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Samples/Game2/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/Samples/Game2/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | .DS_Store
4 | /build
5 | .idea/
6 | /captures
7 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/HomeLauncher.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/ReadMe:
--------------------------------------------------------------------------------
1 | this is a home page,package id is 0x6b
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.openatlas.homelauncher"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.00x6b"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | provided files('libs/android-support-v4.jar')
24 | provided files('libs/atlasforandroid.jar')
25 | }
26 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/app/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/libs/atlasforandroid.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/app/libs/atlasforandroid.jar
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/BunnyBlue/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/androidTest/java/com/openatlas/homelauncher/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.homelauncher;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/java/com/openatlas/homelauncher/fragment/ScreenSlidePagerAdapter.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.homelauncher.fragment;
2 |
3 | import android.support.v4.app.FragmentStatePagerAdapter;
4 | import android.support.v4.app.Fragment;
5 | import android.support.v4.app.FragmentManager;
6 | /**
7 | * Created by BunnyBlue on 5/8/15.
8 | */
9 | public class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
10 | public ScreenSlidePagerAdapter(FragmentManager fm) {
11 | super(fm);
12 | }
13 |
14 | @Override
15 | public Fragment getItem(int position) {
16 | if (position==0)
17 | {
18 |
19 | return new InstalledAppFragment();
20 | }else if (position==1){
21 | return new DelayAppFragment();
22 | }else if (position==2){
23 | return new StoredAppFragment();
24 | }
25 | return null;
26 | }
27 |
28 | @Override
29 | public int getCount() {
30 | return 3;
31 | }
32 | }
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/java/com/openatlas/homelauncher/fragment/dummy/DummyContent.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.homelauncher.fragment.dummy;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 | import java.util.List;
6 | import java.util.Map;
7 |
8 | /**
9 | * Helper class for providing sample content for user interfaces created by
10 | * Android template wizards.
11 | *
12 | * TODO: Replace all uses of this class before publishing your app.
13 | */
14 | public class DummyContent {
15 |
16 | /**
17 | * An array of sample (dummy) items.
18 | */
19 | public static List ITEMS = new ArrayList();
20 |
21 | /**
22 | * A map of sample (dummy) items, by ID.
23 | */
24 | public static Map ITEM_MAP = new HashMap();
25 |
26 | static {
27 | // Add 3 sample items.
28 | addItem(new DummyItem("1", "Item 1"));
29 | addItem(new DummyItem("2", "Item 2"));
30 | addItem(new DummyItem("3", "Item 3"));
31 | }
32 |
33 | private static void addItem(DummyItem item) {
34 | ITEMS.add(item);
35 | ITEM_MAP.put(item.id, item);
36 | }
37 |
38 | /**
39 | * A dummy item representing a piece of content.
40 | */
41 | public static class DummyItem {
42 | public String id;
43 | public String content;
44 |
45 | public DummyItem(String id, String content) {
46 | this.id = id;
47 | this.content = content;
48 | }
49 |
50 | @Override
51 | public String toString() {
52 | return content;
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/layout/layout_apps_installed.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | HomeLauncher
3 |
4 | Hello world!
5 | Settings
6 |
7 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.+'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/Samples/HomeLauncher/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/HomeLauncher/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Samples/HomeLauncher/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/Samples/HomeLauncher/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/Samples/Imageloader/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | .DS_Store
3 | /build
4 | /captures
5 |
--------------------------------------------------------------------------------
/Samples/Imageloader/Imageloader.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.taobao.universalimageloader.sample"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.00x6a"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | provided files('libs/android-support-v4.jar')
24 | compile files('libs/okhttp-2.3.0.jar')
25 | compile files('libs/universal-image-loader-1.9.4-SNAPSHOT.jar')
26 | }
27 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/libs/android-support-v4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/libs/android-support-v4.jar
--------------------------------------------------------------------------------
/Samples/Imageloader/app/libs/okhttp-2.3.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/libs/okhttp-2.3.0.jar
--------------------------------------------------------------------------------
/Samples/Imageloader/app/libs/universal-image-loader-1.9.4-SNAPSHOT.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/libs/universal-image-loader-1.9.4-SNAPSHOT.jar
--------------------------------------------------------------------------------
/Samples/Imageloader/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/BunnyBlue/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/androidTest/java/com/taobao/universalimageloader/sample/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.taobao.universalimageloader.sample;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
24 |
25 |
26 |
27 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/java/com/nostra13/universalimageloader/sample/ext/BrokenJpegImageDecoder.java:
--------------------------------------------------------------------------------
1 | package com.nostra13.universalimageloader.sample.ext;
2 |
3 | import com.nostra13.universalimageloader.core.decode.BaseImageDecoder;
4 | import com.nostra13.universalimageloader.core.decode.ImageDecodingInfo;
5 |
6 | import java.io.IOException;
7 | import java.io.InputStream;
8 |
9 | /**
10 | * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
11 | */
12 | public class BrokenJpegImageDecoder extends BaseImageDecoder {
13 |
14 | public BrokenJpegImageDecoder(boolean loggingEnabled) {
15 | super(loggingEnabled);
16 | }
17 |
18 | @Override
19 | protected InputStream getImageStream(ImageDecodingInfo decodingInfo) throws IOException {
20 | InputStream stream = decodingInfo.getDownloader()
21 | .getStream(decodingInfo.getImageUri(), decodingInfo.getExtraForDownloader());
22 | return stream == null ? null : new JpegClosedInputStream(stream);
23 | }
24 |
25 | private class JpegClosedInputStream extends InputStream {
26 |
27 | private static final int JPEG_EOI_1 = 0xFF;
28 | private static final int JPEG_EOI_2 = 0xD9;
29 |
30 | private final InputStream inputStream;
31 | private int bytesPastEnd;
32 |
33 | private JpegClosedInputStream(InputStream inputStream) {
34 | this.inputStream = inputStream;
35 | bytesPastEnd = 0;
36 | }
37 |
38 | @Override
39 | public int read() throws IOException {
40 | int buffer = inputStream.read();
41 | if (buffer == -1) {
42 | if (bytesPastEnd > 0) {
43 | buffer = JPEG_EOI_2;
44 | } else {
45 | ++bytesPastEnd;
46 | buffer = JPEG_EOI_1;
47 | }
48 | }
49 |
50 | return buffer;
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/java/com/nostra13/universalimageloader/sample/ext/HttpClientImageDownloader.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011-2015 Sergey Tarasevich
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.nostra13.universalimageloader.sample.ext;
17 |
18 | import android.content.Context;
19 | import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
20 | import org.apache.http.HttpEntity;
21 | import org.apache.http.HttpResponse;
22 | import org.apache.http.client.HttpClient;
23 | import org.apache.http.client.methods.HttpGet;
24 | import org.apache.http.entity.BufferedHttpEntity;
25 |
26 | import java.io.IOException;
27 | import java.io.InputStream;
28 |
29 | /**
30 | * Implementation of ImageDownloader which uses {@link HttpClient} for image stream retrieving.
31 | *
32 | * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
33 | */
34 | public class HttpClientImageDownloader extends BaseImageDownloader {
35 |
36 | private HttpClient httpClient;
37 |
38 | public HttpClientImageDownloader(Context context, HttpClient httpClient) {
39 | super(context);
40 | this.httpClient = httpClient;
41 | }
42 |
43 | @Override
44 | protected InputStream getStreamFromNetwork(String imageUri, Object extra) throws IOException {
45 | HttpGet httpRequest = new HttpGet(imageUri);
46 | HttpResponse response = httpClient.execute(httpRequest);
47 | HttpEntity entity = response.getEntity();
48 | BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity);
49 | return bufHttpEntity.getContent();
50 | }
51 | }
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/java/com/nostra13/universalimageloader/sample/ext/OkHttpImageDownloader.java:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright 2011-2015 Sergey Tarasevich
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *******************************************************************************/
16 | package com.nostra13.universalimageloader.sample.ext;
17 |
18 | import android.content.Context;
19 | import com.nostra13.universalimageloader.core.download.BaseImageDownloader;
20 | import com.squareup.okhttp.OkHttpClient;
21 | import com.squareup.okhttp.Request;
22 |
23 | import java.io.IOException;
24 | import java.io.InputStream;
25 |
26 | /**
27 | * Implementation of ImageDownloader which uses {@link com.squareup.okhttp.OkHttpClient} for image stream retrieving.
28 | *
29 | * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
30 | */
31 | public class OkHttpImageDownloader extends BaseImageDownloader {
32 |
33 | private OkHttpClient client;
34 |
35 | public OkHttpImageDownloader(Context context, OkHttpClient client) {
36 | super(context);
37 | this.client = client;
38 | }
39 |
40 | @Override
41 | protected InputStream getStreamFromNetwork(String imageUri, Object extra) throws IOException {
42 | Request request = new Request.Builder().url(imageUri).build();
43 | return client.newCall(request).execute().body().byteStream();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/java/com/nostra13/universalimageloader/sample/fragment/BaseFragment.java:
--------------------------------------------------------------------------------
1 | /**
2 | * ****************************************************************************
3 | * Copyright 2011-2014 Sergey Tarasevich
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | * *****************************************************************************
17 | */
18 | package com.nostra13.universalimageloader.sample.fragment;
19 |
20 | import android.os.Bundle;
21 | import android.support.v4.app.Fragment;
22 | import android.view.Menu;
23 | import android.view.MenuInflater;
24 | import android.view.MenuItem;
25 |
26 | import com.nostra13.universalimageloader.core.ImageLoader;
27 | import com.taobao.universalimageloader.sample.R;
28 |
29 |
30 | /**
31 | * @author Sergey Tarasevich (nostra13[at]gmail[dot]com)
32 | */
33 | public abstract class BaseFragment extends Fragment {
34 | @Override
35 | public void onCreate(Bundle savedInstanceState) {
36 | super.onCreate(savedInstanceState);
37 |
38 | setHasOptionsMenu(true);
39 | }
40 |
41 | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
42 | inflater.inflate(R.menu.main_menu, menu);
43 | }
44 |
45 | @Override
46 | public boolean onOptionsItemSelected(MenuItem item) {
47 | switch (item.getItemId()) {
48 | case R.id.item_clear_memory_cache:
49 | ImageLoader.getInstance().clearMemoryCache();
50 | return true;
51 | case R.id.item_clear_disc_cache:
52 | ImageLoader.getInstance().clearDiskCache();
53 | return true;
54 | default:
55 | return false;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_empty.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_error.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_stub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-hdpi/ic_stub.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_empty.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_error.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_stub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-ldpi/ic_stub.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_empty.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_error.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_stub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-mdpi/ic_stub.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_empty.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_error.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_stub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-xhdpi/ic_stub.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/ac_complex.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/ac_home.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
20 |
21 |
28 |
29 |
36 |
37 |
44 |
45 |
52 |
53 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/fr_image_gallery.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/fr_image_grid.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/fr_image_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/fr_image_pager.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/item_gallery_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/item_grid_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
22 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/item_list_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
14 |
15 |
22 |
23 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/item_pager_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
21 |
22 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/layout/widget.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
20 |
31 |
32 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/values-v11/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Universal Image Loader
4 | Image List Example
5 | Image Grid Example
6 | Image Pager Example
7 | Image Gallery Example
8 | Complex Example
9 |
10 | Examples
11 | ListView
12 | GridView
13 | ViewPager
14 | Gallery
15 | ViewPager (ListView + GridView)
16 |
17 | List
18 | Grid
19 |
20 | Clear memory cache
21 | Clear disc cache
22 | Pause on scroll
23 | Pause on fling
24 |
25 |
26 | Image
27 |
28 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Samples/Imageloader/app/src/main/res/xml/widget_provider.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
--------------------------------------------------------------------------------
/Samples/Imageloader/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.+'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/Imageloader/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/Samples/Imageloader/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/Imageloader/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Samples/Imageloader/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/Samples/Imageloader/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/Samples/QRCode/.gitignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | /local.properties
3 | /bin
4 | /gen
5 | .DS_Store
6 | /build
7 | /captures
8 |
--------------------------------------------------------------------------------
/Samples/QRCode/QRCode.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | applicationId "com.openatlas.qrcode"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.00x6c"
13 | }
14 | sourceSets {
15 | main {
16 |
17 | jniLibs.srcDir 'libs'
18 | }
19 | }
20 | buildTypes {
21 | release {
22 | minifyEnabled false
23 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
24 | }
25 | }
26 | }
27 |
28 | dependencies {
29 | compile fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/libs/armeabi/libbarcode.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/libs/armeabi/libbarcode.so
--------------------------------------------------------------------------------
/Samples/QRCode/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/BunnyBlue/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/androidTest/java/com/openatlas/qrcode/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.qrcode;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
9 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/google/zxing/client/android/camera/AutoFocusCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.client.android.camera;
18 |
19 | import android.hardware.Camera;
20 | import android.os.Handler;
21 | import android.os.Message;
22 | import android.util.Log;
23 |
24 | final class AutoFocusCallback implements Camera.AutoFocusCallback {
25 |
26 | private static final String TAG = AutoFocusCallback.class.getSimpleName();
27 |
28 | private static final long AUTOFOCUS_INTERVAL_MS = 1500L;
29 |
30 | private Handler autoFocusHandler;
31 | private int autoFocusMessage;
32 |
33 | void setHandler(Handler autoFocusHandler, int autoFocusMessage) {
34 | this.autoFocusHandler = autoFocusHandler;
35 | this.autoFocusMessage = autoFocusMessage;
36 | }
37 |
38 | public void onAutoFocus(boolean success, Camera camera) {
39 | if (autoFocusHandler != null) {
40 | Message message = autoFocusHandler.obtainMessage(autoFocusMessage, success);
41 | autoFocusHandler.sendMessageDelayed(message, AUTOFOCUS_INTERVAL_MS);
42 | autoFocusHandler = null;
43 | } else {
44 | Log.d(TAG, "Got auto-focus callback, but no handler for it");
45 | }
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/google/zxing/client/android/decoding/FinishListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 ZXing authors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.zxing.client.android.decoding;
18 |
19 | import android.app.Activity;
20 | import android.content.DialogInterface;
21 |
22 | /**
23 | * Simple listener used to exit the app in a few cases.
24 | *
25 | */
26 | public final class FinishListener
27 | implements DialogInterface.OnClickListener, DialogInterface.OnCancelListener, Runnable {
28 |
29 | private final Activity activityToFinish;
30 |
31 | public FinishListener(Activity activityToFinish) {
32 | this.activityToFinish = activityToFinish;
33 | }
34 |
35 | public void onCancel(DialogInterface dialogInterface) {
36 | run();
37 | }
38 |
39 | public void onClick(DialogInterface dialogInterface, int i) {
40 | run();
41 | }
42 |
43 | public void run() {
44 | activityToFinish.finish();
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/google/zxing/client/android/view/ViewfinderResultPointCallback.java:
--------------------------------------------------------------------------------
1 | ///*
2 | // * Copyright (C) 2009 ZXing authors
3 | // *
4 | // * Licensed under the Apache License, Version 2.0 (the "License");
5 | // * you may not use this file except in compliance with the License.
6 | // * You may obtain a copy of the License at
7 | // *
8 | // * http://www.apache.org/licenses/LICENSE-2.0
9 | // *
10 | // * Unless required by applicable law or agreed to in writing, software
11 | // * distributed under the License is distributed on an "AS IS" BASIS,
12 | // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | // * See the License for the specific language governing permissions and
14 | // * limitations under the License.
15 | // */
16 | //
17 | //package com.google.zxing.client.android.view;
18 | //
19 | //import com.google.zxing.ResultPoint;
20 | //import com.google.zxing.ResultPointCallback;
21 | //
22 | //public final class ViewfinderResultPointCallback implements ResultPointCallback {
23 | //
24 | // private final ViewfinderView viewfinderView;
25 | //
26 | // public ViewfinderResultPointCallback(ViewfinderView viewfinderView) {
27 | // this.viewfinderView = viewfinderView;
28 | // }
29 | //
30 | // public void foundPossibleResultPoint(ResultPoint point) {
31 | // viewfinderView.addPossibleResultPoint(point);
32 | // }
33 | //
34 | // }
35 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/openatlas/qrcode/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.openatlas.qrcode;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.graphics.Bitmap;
6 | import android.os.Bundle;
7 | import android.view.View;
8 | import android.view.View.OnClickListener;
9 | import android.widget.Button;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | public class MainActivity extends Activity {
14 | private final static int SCANNIN_GREQUEST_CODE = 1;
15 | /**
16 | * 显示扫描结果
17 | */
18 | private TextView mTextView;
19 | /**
20 | * 显示扫描拍的图片
21 | */
22 | private ImageView mImageView;
23 |
24 | @Override
25 | protected void onCreate(Bundle savedInstanceState) {
26 | super.onCreate(savedInstanceState);
27 | setContentView(R.layout.activity_main);
28 |
29 | mTextView = (TextView) findViewById(R.id.result);
30 | mImageView = (ImageView) findViewById(R.id.qrcode_bitmap);
31 |
32 | // 点击按钮跳转到二维码扫描界面,这里用的是startActivityForResult跳转
33 | // 扫描完了之后调到该界面
34 | Button mButton = (Button) findViewById(R.id.button1);
35 | mButton.setOnClickListener(new OnClickListener() {
36 |
37 | @Override
38 | public void onClick(View v) {
39 | Intent intent = new Intent();
40 | intent.setClass(MainActivity.this, CaptureActivity.class);
41 | intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
42 | startActivityForResult(intent, SCANNIN_GREQUEST_CODE);
43 | }
44 | });
45 | }
46 |
47 | @Override
48 | protected void onActivityResult(int requestCode, int resultCode, Intent data) {
49 | super.onActivityResult(requestCode, resultCode, data);
50 | switch (requestCode) {
51 | case SCANNIN_GREQUEST_CODE:
52 | if (resultCode == RESULT_OK) {
53 | Bundle bundle = data.getExtras();
54 | // 显示扫描到的内容
55 | mTextView.setText(bundle.getString("result"));
56 | // 显示
57 | mImageView.setImageBitmap((Bitmap) data
58 | .getParcelableExtra("bitmap"));
59 | }
60 | break;
61 | }
62 | }
63 | public void usageFile() {
64 | String path;
65 | BarCode barCode=new BarCode();
66 | Bitmap bitmap=null;
67 | barCode.decodeRaw(barCode.getNV21FromBitmap(bitmap), bitmap.getWidth() , bitmap.getHeight());
68 |
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/test/ATest.java:
--------------------------------------------------------------------------------
1 | package com.test;
2 |
3 | public abstract class ATest {
4 |
5 | public abstract void aTest1();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/test/ITest.java:
--------------------------------------------------------------------------------
1 | package com.test;
2 |
3 | public interface ITest {
4 | public void itest1();
5 | public void itest2();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/java/com/test/Impl.java:
--------------------------------------------------------------------------------
1 | package com.test;
2 | import com.test.*;
3 | public class Impl extends ATest implements ITest {
4 |
5 | @Override
6 | public void itest1() {
7 | // TODO Auto-generated method stub
8 |
9 | }
10 |
11 | @Override
12 | public void itest2() {
13 | // TODO Auto-generated method stub
14 |
15 | }
16 |
17 | public void aTest1() {
18 | // TODO Auto-generated method stub
19 |
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/Android.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2009 The Android Open Source Project
2 | #
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 | #
15 |
16 |
17 | LOCAL_PATH := $(call my-dir)
18 | #APP_PATH:= $(NDK)/$(call my-dir)
19 |
20 | include $(CLEAR_VARS)
21 |
22 | LOCAL_MODULE := libiconv
23 | LIBICONV := libiconv
24 |
25 | LOCAL_CFLAGS := -I$(LOCAL_PATH)/$(LIBICONV)
26 | LOCAL_SRC_FILES := $(LIBICONV)/iconv.c
27 |
28 | include $(BUILD_STATIC_LIBRARY)
29 |
30 | include $(CLEAR_VARS)
31 |
32 | LOCAL_MODULE := barcode
33 |
34 | LOCAL_SRC_FILES := convert.c \
35 | decoder.c \
36 | error.c \
37 | image.c \
38 | img_scanner.c \
39 | refcnt.c \
40 | scanner.c \
41 | symbol.c \
42 | video.c \
43 | window.c \
44 | qrcode/bch15_5.c \
45 | qrcode/binarize.c \
46 | qrcode/isaac.c \
47 | qrcode/qrdec.c \
48 | qrcode/qrdectxt.c \
49 | qrcode/rs.c \
50 | qrcode/util.c \
51 | processor/null.c \
52 | video/null.c \
53 | window/null.c \
54 | decoder/qr_finder.c \
55 | decoder/code128.c \
56 | decoder/code39.c \
57 | decoder/code93.c \
58 | decoder/codabar.c \
59 | decoder/ean.c \
60 | decoder/databar.c \
61 | decoder/i25.c \
62 | com_openatlas_qrcode_BarCode.c
63 |
64 | LOCAL_CFLAGS := -I$(LOCAL_PATH) -I$(LOCAL_PATH)/$(LIBICONV)
65 |
66 | LOCAL_CFLAGS += -O2 -O3 -DUSE_MMAP -fvisibility=hidden
67 | LOCAL_CPPFLAGS += -ffunction-sections -fdata-sections -fvisibility=hidden
68 |
69 | LOCAL_CFLAGS += -ffunction-sections -fdata-sections
70 | LOCAL_LDFLAGS += -Wl,--gc-sections
71 | LOCAL_LDLIBS := -llog
72 |
73 | LOCAL_STATIC_LIBRARIES := libiconv
74 |
75 | include $(BUILD_SHARED_LIBRARY)
76 |
77 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/Application.mk:
--------------------------------------------------------------------------------
1 | APP_ABI := armeabi
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/com_openatlas_qrcode_BarCode.h:
--------------------------------------------------------------------------------
1 | /* DO NOT EDIT THIS FILE - it is machine generated */
2 | #include
3 | /* Header for class com_openatlas_qrcode_BarCode */
4 |
5 | #ifndef _Included_com_openatlas_qrcode_BarCode
6 | #define _Included_com_openatlas_qrcode_BarCode
7 | #ifdef __cplusplus
8 | extern "C" {
9 | #endif
10 | /*
11 | * Class: com_openatlas_qrcode_BarCode
12 | * Method: decodeRaw
13 | * Signature: ([BII)Ljava/lang/String;
14 | */
15 | JNIEXPORT jstring JNICALL Java_com_openatlas_qrcode_BarCode_decodeRaw
16 | (JNIEnv *, jclass, jbyteArray, jint, jint);
17 |
18 | /*
19 | * Class: com_openatlas_qrcode_BarCode
20 | * Method: decodeCrop
21 | * Signature: ([BIIIIII)Ljava/lang/String;
22 | */
23 | JNIEXPORT jstring JNICALL Java_com_openatlas_qrcode_BarCode_decodeCrop
24 | (JNIEnv *, jclass, jbyteArray, jint, jint, jint, jint, jint, jint);
25 |
26 | #ifdef __cplusplus
27 | }
28 | #endif
29 | #endif
30 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/codabar.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2011 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _CODABAR_H_
24 | #define _CODABAR_H_
25 |
26 | /* Codabar specific decode state */
27 | typedef struct codabar_decoder_s {
28 | unsigned direction : 1; /* scan direction: 0=fwd, 1=rev */
29 | unsigned element : 4; /* element offset 0-7 */
30 | int character : 12; /* character position in symbol */
31 | unsigned s7; /* current character width */
32 | unsigned width; /* last character width */
33 | unsigned char buf[6]; /* initial scan buffer */
34 |
35 | unsigned config;
36 | int configs[NUM_CFGS]; /* int valued configurations */
37 | } codabar_decoder_t;
38 |
39 | /* reset Codabar specific state */
40 | static inline void codabar_reset (codabar_decoder_t *codabar)
41 | {
42 | codabar->direction = 0;
43 | codabar->element = 0;
44 | codabar->character = -1;
45 | codabar->s7 = 0;
46 | }
47 |
48 | /* decode Codabar symbols */
49 | zbar_symbol_type_t _zbar_decode_codabar(zbar_decoder_t *dcode);
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/code128.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2007-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _CODE128_H_
24 | #define _CODE128_H_
25 |
26 | /* Code 128 specific decode state */
27 | typedef struct code128_decoder_s {
28 | unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */
29 | unsigned element : 3; /* element offset 0-5 */
30 | int character : 12; /* character position in symbol */
31 | unsigned char start; /* start character */
32 | unsigned s6; /* character width */
33 | unsigned width; /* last character width */
34 |
35 | unsigned config;
36 | int configs[NUM_CFGS]; /* int valued configurations */
37 | } code128_decoder_t;
38 |
39 | /* reset Code 128 specific state */
40 | static inline void code128_reset (code128_decoder_t *dcode128)
41 | {
42 | dcode128->direction = 0;
43 | dcode128->element = 0;
44 | dcode128->character = -1;
45 | dcode128->s6 = 0;
46 | }
47 |
48 | /* decode Code 128 symbols */
49 | zbar_symbol_type_t _zbar_decode_code128(zbar_decoder_t *dcode);
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/code39.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2008-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _CODE39_H_
24 | #define _CODE39_H_
25 |
26 | /* Code 39 specific decode state */
27 | typedef struct code39_decoder_s {
28 | unsigned direction : 1; /* scan direction: 0=fwd, 1=rev */
29 | unsigned element : 4; /* element offset 0-8 */
30 | int character : 12; /* character position in symbol */
31 | unsigned s9; /* current character width */
32 | unsigned width; /* last character width */
33 |
34 | unsigned config;
35 | int configs[NUM_CFGS]; /* int valued configurations */
36 | } code39_decoder_t;
37 |
38 | /* reset Code 39 specific state */
39 | static inline void code39_reset (code39_decoder_t *dcode39)
40 | {
41 | dcode39->direction = 0;
42 | dcode39->element = 0;
43 | dcode39->character = -1;
44 | dcode39->s9 = 0;
45 | }
46 |
47 | /* decode Code 39 symbols */
48 | zbar_symbol_type_t _zbar_decode_code39(zbar_decoder_t *dcode);
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/code93.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2010 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _CODE93_H_
24 | #define _CODE93_H_
25 |
26 | /* Code 93 specific decode state */
27 | typedef struct code93_decoder_s {
28 | unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */
29 | unsigned element : 3; /* element offset 0-5 */
30 | int character : 12; /* character position in symbol */
31 | unsigned width; /* last character width */
32 | unsigned char buf; /* first character */
33 |
34 | unsigned config;
35 | int configs[NUM_CFGS]; /* int valued configurations */
36 | } code93_decoder_t;
37 |
38 | /* reset Code 93 specific state */
39 | static inline void code93_reset (code93_decoder_t *dcode93)
40 | {
41 | dcode93->direction = 0;
42 | dcode93->element = 0;
43 | dcode93->character = -1;
44 | }
45 |
46 | /* decode Code 93 symbols */
47 | zbar_symbol_type_t _zbar_decode_code93(zbar_decoder_t *dcode);
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/i25.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2008-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _I25_H_
24 | #define _I25_H_
25 |
26 | /* interleaved 2 of 5 specific decode state */
27 | typedef struct i25_decoder_s {
28 | unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */
29 | unsigned element : 4; /* element offset 0-8 */
30 | int character : 12; /* character position in symbol */
31 | unsigned s10; /* current character width */
32 | unsigned width; /* last character width */
33 | unsigned char buf[4]; /* initial scan buffer */
34 |
35 | unsigned config;
36 | int configs[NUM_CFGS]; /* int valued configurations */
37 | } i25_decoder_t;
38 |
39 | /* reset interleaved 2 of 5 specific state */
40 | static inline void i25_reset (i25_decoder_t *i25)
41 | {
42 | i25->direction = 0;
43 | i25->element = 0;
44 | i25->character = -1;
45 | i25->s10 = 0;
46 | }
47 |
48 | /* decode interleaved 2 of 5 symbols */
49 | zbar_symbol_type_t _zbar_decode_i25(zbar_decoder_t *dcode);
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/pdf417.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2008-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _PDF417_H_
24 | #define _PDF417_H_
25 |
26 | /* PDF417 specific decode state */
27 | typedef struct pdf417_decoder_s {
28 | unsigned direction : 1; /* scan direction: 0=fwd/space, 1=rev/bar */
29 | unsigned element : 3; /* element offset 0-7 */
30 | int character : 12; /* character position in symbol */
31 | unsigned s8; /* character width */
32 |
33 | unsigned config;
34 | int configs[NUM_CFGS]; /* int valued configurations */
35 | } pdf417_decoder_t;
36 |
37 | /* reset PDF417 specific state */
38 | static inline void pdf417_reset (pdf417_decoder_t *pdf417)
39 | {
40 | pdf417->direction = 0;
41 | pdf417->element = 0;
42 | pdf417->character = -1;
43 | pdf417->s8 = 0;
44 | }
45 |
46 | /* decode PDF417 symbols */
47 | zbar_symbol_type_t _zbar_decode_pdf417(zbar_decoder_t *dcode);
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/decoder/qr_finder.h:
--------------------------------------------------------------------------------
1 | #ifndef _DECODER_QR_FINDER_H_
2 | #define _DECODER_QR_FINDER_H_
3 |
4 | #include "qrcode.h"
5 |
6 | /* QR Code symbol finder state */
7 | typedef struct qr_finder_s {
8 | unsigned s5; /* finder pattern width */
9 | qr_finder_line line; /* position info needed by decoder */
10 |
11 | unsigned config;
12 | } qr_finder_t;
13 |
14 | /* reset QR finder specific state */
15 | static inline void qr_finder_reset (qr_finder_t *qrf)
16 | {
17 | qrf->s5 = 0;
18 | }
19 |
20 | /* find QR Code symbols */
21 | zbar_symbol_type_t _zbar_find_qr (zbar_decoder_t *dcode);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/event.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2007-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _ZBAR_EVENT_H_
24 | #define _ZBAR_EVENT_H_
25 |
26 | #include
27 | #include "mutex.h"
28 | #include "timer.h"
29 |
30 | /* platform synchronization "event" abstraction
31 | */
32 |
33 | #if defined(_WIN32)
34 |
35 | # include
36 |
37 | typedef HANDLE zbar_event_t;
38 |
39 |
40 | #else
41 |
42 | # ifdef HAVE_LIBPTHREAD
43 | # include
44 | # endif
45 |
46 | typedef struct zbar_event_s {
47 | int state;
48 | # ifdef HAVE_LIBPTHREAD
49 | pthread_cond_t cond;
50 | # endif
51 | int pollfd;
52 | } zbar_event_t;
53 |
54 | #endif
55 |
56 |
57 | extern int _zbar_event_init(zbar_event_t*);
58 | extern void _zbar_event_destroy(zbar_event_t*);
59 | extern void _zbar_event_trigger(zbar_event_t*);
60 | extern int _zbar_event_wait(zbar_event_t*, zbar_mutex_t*, zbar_timer_t*);
61 |
62 | #endif
63 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/img_scanner.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2007-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _IMG_SCANNER_H_
24 | #define _IMG_SCANNER_H_
25 |
26 | #include
27 |
28 | /* internal image scanner APIs for 2D readers */
29 |
30 | extern zbar_symbol_t *_zbar_image_scanner_alloc_sym(zbar_image_scanner_t*,
31 | zbar_symbol_type_t,
32 | int);
33 | extern void _zbar_image_scanner_add_sym(zbar_image_scanner_t*,
34 | zbar_symbol_t*);
35 | extern void _zbar_image_scanner_recycle_syms(zbar_image_scanner_t*,
36 | zbar_symbol_t*);
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/libiconv/iconv.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include
5 |
6 | iconv_t iconv_open (const char *tocode, const char *fromcode) {
7 | return NULL;
8 | }
9 |
10 | size_t iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft,
11 | char **outbuf, size_t *outbytesleft) {
12 | size_t sz = *inbytesleft;
13 | memcpy(*outbuf, *inbuf, sz);
14 |
15 | __android_log_print(ANDROID_LOG_DEBUG, "zbar", "convert: %s, sz=%d", *inbuf, sz);
16 |
17 | *inbuf += sz;
18 | *outbuf += sz;
19 | *inbytesleft -= sz;
20 | *outbytesleft -= sz;
21 | return sz;
22 | }
23 |
24 | int iconv_close (iconv_t cd) {
25 | return 0;
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/libiconv/iconv.h:
--------------------------------------------------------------------------------
1 | #ifndef __ICONV_H__
2 | #define __ICONV_H__
3 |
4 | typedef void *iconv_t;
5 | extern iconv_t iconv_open (const char *tocode, const char *fromcode);
6 | extern size_t iconv (iconv_t cd, const char **inbuf,
7 | size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
8 | extern int iconv_close (iconv_t cd);
9 |
10 | #endif /* __ICONV_H__ */
11 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/libzbar.rc:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #define STR(s) #s
5 | #define XSTR(s) STR(s)
6 |
7 | VS_VERSION_INFO VERSIONINFO
8 | FILEVERSION LIB_VERSION_MAJOR, LIB_VERSION_MINOR, LIB_VERSION_REVISION, 0
9 | PRODUCTVERSION ZBAR_VERSION_MAJOR, ZBAR_VERSION_MINOR, 0, 0
10 | FILEOS VOS__WINDOWS32
11 | FILETYPE VFT_DLL
12 | {
13 | BLOCK "StringFileInfo" {
14 | BLOCK "040904E4" {
15 | VALUE "ProductName", "ZBar Bar Code Reader"
16 | VALUE "Company Name", "ZBar Bar Code Reader"
17 | VALUE "InternalName", "libzbar"
18 | VALUE "OriginalFilename", "libzbar-" XSTR(LIB_VERSION_MAJOR) ".dll"
19 |
20 | VALUE "FileVersion", XSTR(LIB_VERSION_MAJOR) "." \
21 | XSTR(LIB_VERSION_MINOR) "." XSTR(LIB_VERSION_REVISION)
22 | VALUE "ProductVersion", PACKAGE_VERSION
23 |
24 | VALUE "FileDescription", "Bar code reader library"
25 |
26 | VALUE "LegalCopyright", "Copyright 2007-2009 (c) Jeff Brown "
27 | }
28 | }
29 | BLOCK "VarFileInfo" {
30 | VALUE "Translation", 0x0409, 0x04e4
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/qrcode/bch15_5.h:
--------------------------------------------------------------------------------
1 | /*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org)
2 | You can redistribute this library and/or modify it under the terms of the
3 | GNU Lesser General Public License as published by the Free Software
4 | Foundation; either version 2.1 of the License, or (at your option) any later
5 | version.*/
6 | #if !defined(_bch15_5_H)
7 | # define _bch15_5_H (1)
8 |
9 | /*Encodes a raw 5-bit value _x into a 15-bit BCH(15,5) code.
10 | This is capable of correcting up to 3 bit errors, and detecting as many as
11 | 5 bit errors in some cases.*/
12 | unsigned bch15_5_encode(unsigned _x);
13 |
14 | /*Corrects the received code *_y, if possible.
15 | The original data is located in the top five bits.
16 | Returns the number of errors corrected, or a negative value if decoding
17 | failed due to too many bit errors, in which case *_y is left unchanged.*/
18 | int bch15_5_correct(unsigned *_y);
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/qrcode/binarize.h:
--------------------------------------------------------------------------------
1 | /*Copyright (C) 2008-2009 Timothy B. Terriberry (tterribe@xiph.org)
2 | You can redistribute this library and/or modify it under the terms of the
3 | GNU Lesser General Public License as published by the Free Software
4 | Foundation; either version 2.1 of the License, or (at your option) any later
5 | version.*/
6 | #if !defined(_qrcode_binarize_H)
7 | # define _qrcode_binarize_H (1)
8 |
9 | void qr_image_cross_masking_median_filter(unsigned char *_img,
10 | int _width,int _height);
11 |
12 | void qr_wiener_filter(unsigned char *_img,int _width,int _height);
13 |
14 | /*Binarizes a grayscale image.*/
15 | unsigned char *qr_binarize(const unsigned char *_img,int _width,int _height);
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/qrcode/isaac.h:
--------------------------------------------------------------------------------
1 | /*Written by Timothy B. Terriberry (tterribe@xiph.org) 1999-2009 public domain.
2 | Based on the public domain implementation by Robert J. Jenkins Jr.*/
3 | #if !defined(_isaac_H)
4 | # define _isaac_H (1)
5 |
6 |
7 |
8 | typedef struct isaac_ctx isaac_ctx;
9 |
10 |
11 |
12 | #define ISAAC_SZ_LOG (8)
13 | #define ISAAC_SZ (1<
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 |
24 | #include "refcnt.h"
25 |
26 | #if !defined(_WIN32) && !defined(TARGET_OS_MAC) && defined(HAVE_LIBPTHREAD)
27 |
28 | pthread_once_t initialized = PTHREAD_ONCE_INIT;
29 | pthread_mutex_t _zbar_reflock;
30 |
31 | static void initialize (void)
32 | {
33 | pthread_mutex_init(&_zbar_reflock, NULL);
34 | }
35 |
36 | void _zbar_refcnt_init ()
37 | {
38 | pthread_once(&initialized, initialize);
39 | }
40 |
41 |
42 | #else
43 |
44 | void _zbar_refcnt_init ()
45 | {
46 | }
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/video/null.c:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2008-2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 |
24 | #include "video.h"
25 |
26 | static inline int null_error (void *m,
27 | const char *func)
28 | {
29 | return(err_capture(m, SEV_ERROR, ZBAR_ERR_UNSUPPORTED, func,
30 | "not compiled with video input support"));
31 | }
32 |
33 | int _zbar_video_open (zbar_video_t *vdo,
34 | const char *device)
35 | {
36 | return(null_error(vdo, __func__));
37 | }
38 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/jniCode/window/win.h:
--------------------------------------------------------------------------------
1 | /*------------------------------------------------------------------------
2 | * Copyright 2009 (c) Jeff Brown
3 | *
4 | * This file is part of the ZBar Bar Code Reader.
5 | *
6 | * The ZBar Bar Code Reader is free software; you can redistribute it
7 | * and/or modify it under the terms of the GNU Lesser Public License as
8 | * published by the Free Software Foundation; either version 2.1 of
9 | * the License, or (at your option) any later version.
10 | *
11 | * The ZBar Bar Code Reader is distributed in the hope that it will be
12 | * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU Lesser Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser Public License
17 | * along with the ZBar Bar Code Reader; if not, write to the Free
18 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19 | * Boston, MA 02110-1301 USA
20 | *
21 | * http://sourceforge.net/projects/zbar
22 | *------------------------------------------------------------------------*/
23 | #ifndef _WINDOW_WIN_H_
24 | #define _WINDOW_WIN_H_
25 |
26 | #include
27 |
28 | struct window_state_s {
29 | HDC hdc;
30 | void* hdd;
31 |
32 | BITMAPINFOHEADER bih;
33 |
34 | /* pre-calculated logo geometries */
35 | int logo_scale;
36 | HRGN logo_zbars;
37 | HPEN logo_zpen, logo_zbpen;
38 | POINT logo_z[4];
39 |
40 | int font_height;
41 | };
42 |
43 | extern int _zbar_window_bih_init(zbar_window_t *w,
44 | zbar_image_t *img);
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/layout/activity_capture.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
9 |
10 |
15 |
16 |
20 |
21 |
27 |
28 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
13 |
14 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/layout/activity_title.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
16 |
17 |
28 |
29 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_back_focused.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_back_focused.9.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_back_normal.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_back_normal.9.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_back_pressed.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_back_pressed.9.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_bg_alpha.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-hdpi/title_bg_alpha.9.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-xhdpi/capture.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-xhdpi/capture.9.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-xhdpi/scan_line.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-xhdpi/scan_line.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-xhdpi/scan_mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-xhdpi/scan_mask.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/raw/beep.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/app/src/main/res/raw/beep.ogg
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/raw/realm_properties:
--------------------------------------------------------------------------------
1 | test: test
2 | admin: OBF:1u2a1toa1w8v1tok1u30,admin
3 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/values/color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #b0000000
5 | #60000000
6 | #c0ffff00
7 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | false
38 | false
39 |
40 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | QR_CodeScan
5 | Hello world!
6 | Settings
7 |
8 | 将二维码放入框内, 即可自动扫描
9 |
10 |
--------------------------------------------------------------------------------
/Samples/QRCode/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
14 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/Samples/QRCode/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Samples/QRCode/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/Samples/QRCode/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/Samples/QRCode/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Samples/QRCode/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/Samples/QRCode/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/TestReport/ReadMe:
--------------------------------------------------------------------------------
1 | Here is test report docs
2 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundleMaker.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/buildTools/OpenAtlasBundleMaker.jar
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | OpenAtlasBundler
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5 | org.eclipse.jdt.core.compiler.compliance=1.6
6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate
8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
11 | org.eclipse.jdt.core.compiler.source=1.6
12 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/libs/common-io.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WilliamRen/OpenAtlasExtension/8f7b7ee4be487c09703384bce253e869b0b06bc3/buildTools/OpenAtlasBundler/libs/common-io.jar
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/android/content/res/ChunkUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008 Android4ME
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package android.content.res;
17 |
18 | import java.io.IOException;
19 |
20 | /**
21 | * @author Dmitry Skiba
22 | *
23 | */
24 | class ChunkUtil {
25 |
26 | public static final void readCheckType(IntReader reader,int expectedType) throws IOException {
27 | int type=reader.readInt();
28 | if (type!=expectedType) {
29 | throw new IOException(
30 | "Expected chunk of type 0x"+Integer.toHexString(expectedType)+
31 | ", read 0x"+Integer.toHexString(type)+".");
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/android/content/res/XmlResourceParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008 Android4ME
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package android.content.res;
17 |
18 | import org.xmlpull.v1.XmlPullParser;
19 | import android.util.AttributeSet;
20 |
21 | /**
22 | * @author Dmitry Skiba
23 | *
24 | */
25 | public interface XmlResourceParser extends XmlPullParser, AttributeSet {
26 | void close();
27 | }
28 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/android/util/TypedValue.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2008 Android4ME
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package android.util;
17 |
18 | /**
19 | * @author Dmitry Skiba
20 | *
21 | */
22 | public class TypedValue {
23 |
24 | public int type;
25 | public CharSequence string;
26 | public int data;
27 | public int assetCookie;
28 | public int resourceId;
29 | public int changingConfigurations;
30 |
31 | public static final int
32 | TYPE_NULL =0,
33 | TYPE_REFERENCE =1,
34 | TYPE_ATTRIBUTE =2,
35 | TYPE_STRING =3,
36 | TYPE_FLOAT =4,
37 | TYPE_DIMENSION =5,
38 | TYPE_FRACTION =6,
39 | TYPE_FIRST_INT =16,
40 | TYPE_INT_DEC =16,
41 | TYPE_INT_HEX =17,
42 | TYPE_INT_BOOLEAN =18,
43 | TYPE_FIRST_COLOR_INT =28,
44 | TYPE_INT_COLOR_ARGB8 =28,
45 | TYPE_INT_COLOR_RGB8 =29,
46 | TYPE_INT_COLOR_ARGB4 =30,
47 | TYPE_INT_COLOR_RGB4 =31,
48 | TYPE_LAST_COLOR_INT =31,
49 | TYPE_LAST_INT =31;
50 |
51 | public static final int
52 | COMPLEX_UNIT_PX =0,
53 | COMPLEX_UNIT_DIP =1,
54 | COMPLEX_UNIT_SP =2,
55 | COMPLEX_UNIT_PT =3,
56 | COMPLEX_UNIT_IN =4,
57 | COMPLEX_UNIT_MM =5,
58 | COMPLEX_UNIT_SHIFT =0,
59 | COMPLEX_UNIT_MASK =15,
60 | COMPLEX_UNIT_FRACTION =0,
61 | COMPLEX_UNIT_FRACTION_PARENT=1,
62 | COMPLEX_RADIX_23p0 =0,
63 | COMPLEX_RADIX_16p7 =1,
64 | COMPLEX_RADIX_8p15 =2,
65 | COMPLEX_RADIX_0p23 =3,
66 | COMPLEX_RADIX_SHIFT =4,
67 | COMPLEX_RADIX_MASK =3,
68 | COMPLEX_MANTISSA_SHIFT =8,
69 | COMPLEX_MANTISSA_MASK =0xFFFFFF;
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/cpm/openAtlas/bundleInfo/maker/Component.java:
--------------------------------------------------------------------------------
1 | /**OpenAtlasForAndroid Project
2 |
3 | The MIT License (MIT)
4 | Copyright (c) 2015 Bunny Blue
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7 | and associated documentation files (the "Software"), to deal in the Software
8 | without restriction, including without limitation the rights to use, copy, modify,
9 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all copies
13 | or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
18 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | @author BunnyBlue
21 | * **/
22 | package cpm.openAtlas.bundleInfo.maker;
23 |
24 | /**
25 | * @author BunnyBlue
26 | *
27 | */
28 | public enum Component {
29 | ACTIVITY,
30 | SERVISE,
31 | PROVIDER,
32 | RECEIVER
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/cpm/openAtlas/bundleInfo/maker/TextUtils.java:
--------------------------------------------------------------------------------
1 | /**OpenAtlasForAndroid Project
2 |
3 | The MIT License (MIT)
4 | Copyright (c) 2015 Bunny Blue
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7 | and associated documentation files (the "Software"), to deal in the Software
8 | without restriction, including without limitation the rights to use, copy, modify,
9 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all copies
13 | or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
18 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | @author BunnyBlue
21 | * **/
22 | package cpm.openAtlas.bundleInfo.maker;
23 |
24 | /**
25 | * @author BunnyBlue
26 | *
27 | */
28 | public class TextUtils {
29 | public static boolean isEmpty(String text) {
30 | return text!=null&&text.length()>0;
31 | }
32 | public static boolean equals(CharSequence a, CharSequence b) {
33 | if (a == b) return true;
34 | int length;
35 | if (a != null && b != null && (length = a.length()) == b.length()) {
36 | if (a instanceof String && b instanceof String) {
37 | return a.equals(b);
38 | } else {
39 | for (int i = 0; i < length; i++) {
40 | if (a.charAt(i) != b.charAt(i)) return false;
41 | }
42 | return true;
43 | }
44 | }
45 | return false;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/cpm/openAtlas/bundleInfo/maker/package-info.java:
--------------------------------------------------------------------------------
1 | /**OpenAtlasForAndroid Project
2 |
3 | The MIT License (MIT)
4 | Copyright (c) 2015 Bunny Blue
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software
7 | and associated documentation files (the "Software"), to deal in the Software
8 | without restriction, including without limitation the rights to use, copy, modify,
9 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all copies
13 | or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
18 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 | @author BunnyBlue
21 | * **/
22 | /**
23 | * @author BunnyBlue
24 | *
25 | */
26 | package cpm.openAtlas.bundleInfo.maker;
--------------------------------------------------------------------------------
/buildTools/OpenAtlasBundler/src/org/json/JSONException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package org.json;
18 |
19 | // Note: this class was written without inspecting the non-free org.json sourcecode.
20 |
21 | /**
22 | * Thrown to indicate a problem with the JSON API. Such problems include:
23 | *
24 | *
Attempts to parse or construct malformed documents
25 | *
Use of null as a name
26 | *
Use of numeric types not available to JSON, such as {@link
27 | * Double#isNaN() NaNs} or {@link Double#isInfinite() infinities}.
28 | *
Lookups using an out of range index or nonexistent name
29 | *
Type mismatches on lookups
30 | *
31 | *
32 | *
Although this is a checked exception, it is rarely recoverable. Most
33 | * callers should simply wrap this exception in an unchecked exception and
34 | * rethrow:
35 | *