├── AsyncBinder ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ └── activity_boss.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── aidl │ │ │ └── qiwoo │ │ │ │ └── android │ │ │ │ └── async │ │ │ │ └── binder │ │ │ │ ├── Store.aidl │ │ │ │ ├── IOrderService.aidl │ │ │ │ └── IStoreService.aidl │ │ ├── java │ │ │ └── qiwoo │ │ │ │ └── android │ │ │ │ └── async │ │ │ │ └── binder │ │ │ │ ├── OrderService.java │ │ │ │ ├── StoreService.java │ │ │ │ ├── Store.java │ │ │ │ └── BossActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── qiwoo │ │ │ └── android │ │ │ └── async │ │ │ └── binder │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── qiwoo │ │ └── android │ │ └── async │ │ └── binder │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── app ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── layout │ │ │ │ └── activity_main.xml │ │ │ ├── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ │ └── drawable │ │ │ │ └── ic_launcher_background.xml │ │ ├── aidl │ │ │ └── qiwoo │ │ │ │ └── android │ │ │ │ └── sync │ │ │ │ └── binder │ │ │ │ ├── Store.aidl │ │ │ │ ├── IOrderService.aidl │ │ │ │ └── IStoreService.aidl │ │ ├── java │ │ │ └── qiwoo │ │ │ │ └── android │ │ │ │ └── sync │ │ │ │ └── binder │ │ │ │ ├── OrderServiceImpl.java │ │ │ │ ├── StoreServiceImpl.java │ │ │ │ ├── Store.java │ │ │ │ ├── BinderCursor.java │ │ │ │ ├── BinderProvider.java │ │ │ │ └── ui │ │ │ │ └── MainActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── qiwoo │ │ │ └── android │ │ │ └── sync │ │ │ └── binder │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── qiwoo │ │ └── android │ │ └── sync │ │ └── binder │ │ └── ExampleInstrumentedTest.java ├── .gitignore ├── proguard-rules.pro └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat ├── gradlew └── README.md /AsyncBinder/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':AsyncBinder' 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | SyncBinder 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea 5 | .DS_Store 6 | /build 7 | /captures 8 | .externalNativeBuild 9 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AsyncBinder 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/aidl/qiwoo/android/sync/binder/Store.aidl: -------------------------------------------------------------------------------- 1 | // Store.aidl 2 | package qiwoo.android.sync.binder; 3 | 4 | parcelable Store; 5 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/aidl/qiwoo/android/async/binder/Store.aidl: -------------------------------------------------------------------------------- 1 | // Store.aidl.aidl 2 | package qiwoo.android.async.binder; 3 | 4 | parcelable Store; -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | .DS_Store 5 | /build 6 | /captures 7 | .externalNativeBuild 8 | /.idea 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangpeng7/SyncBinder/HEAD/AsyncBinder/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/aidl/qiwoo/android/sync/binder/IOrderService.aidl: -------------------------------------------------------------------------------- 1 | // IOrderService.aidl 2 | package qiwoo.android.sync.binder; 3 | 4 | interface IOrderService { 5 | 6 | int getOrderAmount(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/aidl/qiwoo/android/async/binder/IOrderService.aidl: -------------------------------------------------------------------------------- 1 | // IOrderService.aidl 2 | package qiwoo.android.async.binder; 3 | 4 | interface IOrderService { 5 | 6 | int getOrderAmount(); 7 | 8 | } 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/aidl/qiwoo/android/sync/binder/IStoreService.aidl: -------------------------------------------------------------------------------- 1 | // IStoreService.aidl 2 | package qiwoo.android.sync.binder; 3 | 4 | import qiwoo.android.sync.binder.Store; 5 | 6 | interface IStoreService { 7 | 8 | List getStores(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/aidl/qiwoo/android/async/binder/IStoreService.aidl: -------------------------------------------------------------------------------- 1 | // IStoreService.aidl 2 | package qiwoo.android.async.binder; 3 | 4 | import qiwoo.android.async.binder.Store; 5 | 6 | interface IStoreService { 7 | 8 | List getStores(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Sep 12 17:53:13 CST 2018 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-4.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/qiwoo/android/sync/binder/OrderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package qiwoo.android.sync.binder; 2 | 3 | import android.os.RemoteException; 4 | 5 | public class OrderServiceImpl extends IOrderService.Stub { 6 | 7 | @Override 8 | public int getOrderAmount() throws RemoteException { 9 | return 100; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /AsyncBinder/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/test/java/qiwoo/android/sync/binder/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package qiwoo.android.sync.binder; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /AsyncBinder/src/test/java/qiwoo/android/async/binder/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package qiwoo.android.async.binder; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/qiwoo/android/sync/binder/StoreServiceImpl.java: -------------------------------------------------------------------------------- 1 | package qiwoo.android.sync.binder; 2 | 3 | import android.os.RemoteException; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class StoreServiceImpl extends IStoreService.Stub { 9 | 10 | private List stores; 11 | 12 | public StoreServiceImpl() { 13 | 14 | Store store1 = new Store(1, "qiwoo", "123", "beijing"); 15 | Store store2 = new Store(2, "mobile", "123", "beijing"); 16 | 17 | stores = new ArrayList<>(); 18 | stores.add(store1); 19 | stores.add(store2); 20 | } 21 | 22 | @Override 23 | public List getStores() throws RemoteException { 24 | return stores; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 |