├── .gitignore ├── .idea ├── .name ├── codeStyles │ └── Project.xml ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── gradle.xml ├── jarRepositories.xml ├── misc.xml ├── modules.xml ├── modules │ ├── Demo │ │ └── AppStoreLibrary.Demo.iml │ └── Library │ │ └── AppStoreLibrary.Library.iml └── vcs.xml ├── AppStoreLibrary.iml ├── Demo ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── net │ │ └── sjava │ │ └── appstore │ │ └── demo │ │ └── MainActivity.java │ └── res │ ├── layout │ └── activity_main.xml │ ├── menu │ └── menu_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── Library ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── net │ │ └── sjava │ │ └── appstore │ │ ├── AmazonStoreApp.java │ │ ├── AppStore.java │ │ ├── OneStoreApp.java │ │ ├── PlayAppStore.java │ │ └── PublisherAppOpenable.java │ └── res │ └── values │ └── strings.xml ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | 8 | # Built application files 9 | *.apk 10 | *.ap_ 11 | 12 | # Files for the Dalvik VM 13 | *.dex 14 | 15 | # Java class files 16 | *.class 17 | 18 | # Generated files 19 | bin/ 20 | gen/ 21 | 22 | # Gradle files 23 | .gradle/ 24 | build/ 25 | /*/build/ 26 | 27 | # Local configuration file (sdk path, etc) 28 | local.properties 29 | 30 | # Proguard folder generated by Eclipse 31 | proguard/ 32 | 33 | # Log Files 34 | *.log -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | AppStoreLibrary -------------------------------------------------------------------------------- /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | xmlns:android 14 | 15 | ^$ 16 | 17 | 18 | 19 |
20 |
21 | 22 | 23 | 24 | xmlns:.* 25 | 26 | ^$ 27 | 28 | 29 | BY_NAME 30 | 31 |
32 |
33 | 34 | 35 | 36 | .*:id 37 | 38 | http://schemas.android.com/apk/res/android 39 | 40 | 41 | 42 |
43 |
44 | 45 | 46 | 47 | .*:name 48 | 49 | http://schemas.android.com/apk/res/android 50 | 51 | 52 | 53 |
54 |
55 | 56 | 57 | 58 | name 59 | 60 | ^$ 61 | 62 | 63 | 64 |
65 |
66 | 67 | 68 | 69 | style 70 | 71 | ^$ 72 | 73 | 74 | 75 |
76 |
77 | 78 | 79 | 80 | .* 81 | 82 | ^$ 83 | 84 | 85 | BY_NAME 86 | 87 |
88 |
89 | 90 | 91 | 92 | .* 93 | 94 | http://schemas.android.com/apk/res/android 95 | 96 | 97 | ANDROID_ATTRIBUTE_ORDER 98 | 99 |
100 |
101 | 102 | 103 | 104 | .* 105 | 106 | .* 107 | 108 | 109 | BY_NAME 110 | 111 |
112 |
113 |
114 |
115 |
116 |
-------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 29 | 47 | 48 | 49 | 50 | 51 | 52 | 54 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/modules/Demo/AppStoreLibrary.Demo.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /.idea/modules/Library/AppStoreLibrary.Library.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AppStoreLibrary.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Demo/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Demo/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 31 5 | 6 | defaultConfig { 7 | applicationId "net.sjava.appstore.demo" 8 | minSdkVersion 15 9 | targetSdkVersion 31 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | //proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | 20 | lintOptions { 21 | abortOnError false 22 | } 23 | } 24 | 25 | dependencies { 26 | implementation fileTree(dir: 'libs', include: ['*.jar']) 27 | implementation project(':Library') 28 | implementation 'androidx.appcompat:appcompat:1.4.1' 29 | } 30 | -------------------------------------------------------------------------------- /Demo/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 C:/Program Files/Android/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 | -------------------------------------------------------------------------------- /Demo/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Demo/src/main/java/net/sjava/appstore/demo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package net.sjava.appstore.demo; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | import androidx.appcompat.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.Button; 8 | import android.widget.Toast; 9 | 10 | import net.sjava.appstore.AmazonStoreApp; 11 | import net.sjava.appstore.AppStore; 12 | import net.sjava.appstore.OneStoreApp; 13 | import net.sjava.appstore.PlayAppStore; 14 | import net.sjava.appstore.PublisherAppOpenable; 15 | 16 | public class MainActivity extends AppCompatActivity { 17 | private Context ctx; 18 | 19 | @Override 20 | protected void onCreate(Bundle savedInstanceState) { 21 | super.onCreate(savedInstanceState); 22 | super.setContentView(R.layout.activity_main); 23 | ctx = this; 24 | 25 | initPlayAppStore(); 26 | initAmazonAppStore(); 27 | initOneStore(); 28 | } 29 | 30 | private AppStore appStore; 31 | private PublisherAppOpenable publisherAppOpener; 32 | 33 | //https://play.google.com/store/apps/details?id=com.google.android.gm 34 | private void initPlayAppStore() { 35 | Button btn01 = findViewById(R.id.play_button_01); 36 | Button btn02 = findViewById(R.id.play_button_02); 37 | Button btn03 = findViewById(R.id.play_button_03); 38 | Button btn04 = findViewById(R.id.play_button_04); 39 | 40 | Button btn05 = findViewById(R.id.play_button_05); 41 | Button btn06 = findViewById(R.id.play_button_06); 42 | 43 | btn01.setOnClickListener(new View.OnClickListener() { 44 | @Override 45 | public void onClick(View v) { 46 | appStore = PlayAppStore.newInstance(); 47 | Toast.makeText(ctx, "Play store app is installed: " + appStore.isInstalled(ctx), Toast.LENGTH_SHORT).show(); 48 | } 49 | }); 50 | 51 | btn02.setOnClickListener(new View.OnClickListener() { 52 | @Override 53 | public void onClick(View v) { 54 | appStore = PlayAppStore.newInstance(); 55 | appStore.openApp(ctx, "com.google.android.gm"); 56 | } 57 | }); 58 | 59 | btn03.setOnClickListener(new View.OnClickListener() { 60 | @Override 61 | public void onClick(View v) { 62 | publisherAppOpener = PlayAppStore.newInstance(); 63 | publisherAppOpener.openPublisherApps(ctx, "Google Inc."); 64 | } 65 | }); 66 | 67 | btn04.setOnClickListener(new View.OnClickListener() { 68 | @Override 69 | public void onClick(View v) { 70 | appStore = PlayAppStore.newInstance(); 71 | appStore.searchApp(ctx, "gmail"); 72 | } 73 | }); 74 | 75 | btn05.setOnClickListener(new View.OnClickListener() { 76 | @Override 77 | public void onClick(View v) { 78 | appStore = PlayAppStore.newInstance(); 79 | ((PlayAppStore) appStore).openDeveloperPage(ctx, "nTools"); 80 | 81 | } 82 | }); 83 | 84 | btn06.setOnClickListener(new View.OnClickListener() { 85 | @Override 86 | public void onClick(View v) { 87 | appStore = PlayAppStore.newInstance(); 88 | //Staff Picks (Featured) 89 | /* 90 | Collection collection_name 91 | Staff Picks (Featured) featured 92 | Top Paid topselling_paid 93 | Top Free topselling_free 94 | Top New Free topselling_new_free 95 | Top New Paid topselling_new_paid 96 | Top Grossing topgrossing 97 | Trending movers_shakers 98 | */ 99 | //((PlayAppStore)appStore).openCollectionApps(ctx, "featured"); 100 | ((PlayAppStore) appStore).openCollectionApps(ctx, "topgrossing"); 101 | 102 | } 103 | }); 104 | 105 | } 106 | 107 | private void initAmazonAppStore() { 108 | Button btn01 = findViewById(R.id.amazon_button_01); 109 | Button btn02 = findViewById(R.id.amazon_button_02); 110 | Button btn03 = findViewById(R.id.amazon_button_03); 111 | Button btn04 = findViewById(R.id.amazon_button_04); 112 | 113 | btn01.setOnClickListener(new View.OnClickListener() { 114 | @Override 115 | public void onClick(View v) { 116 | appStore = AmazonStoreApp.newInstance(); 117 | Toast.makeText(ctx, "Amazon store app is installed: " + appStore.isInstalled(ctx), Toast.LENGTH_SHORT).show(); 118 | } 119 | }); 120 | 121 | btn02.setOnClickListener(new View.OnClickListener() { 122 | @Override 123 | public void onClick(View v) { 124 | appStore = AmazonStoreApp.newInstance(); 125 | appStore.openApp(ctx, "com.amazon.mp3"); 126 | } 127 | }); 128 | 129 | btn03.setOnClickListener(new View.OnClickListener() { 130 | @Override 131 | public void onClick(View v) { 132 | publisherAppOpener = AmazonStoreApp.newInstance(); 133 | publisherAppOpener.openPublisherApps(ctx, "com.amazon.mp3"); 134 | } 135 | }); 136 | 137 | btn04.setOnClickListener(new View.OnClickListener() { 138 | @Override 139 | public void onClick(View v) { 140 | appStore = AmazonStoreApp.newInstance(); 141 | appStore.searchApp(ctx, "mp3"); 142 | } 143 | }); 144 | } 145 | 146 | private void initOneStore() { 147 | Button btn01 = findViewById(R.id.tstore_button_01); 148 | Button btn02 = findViewById(R.id.tstore_button_02); 149 | Button btn03 = findViewById(R.id.tstore_button_03); 150 | Button btn04 = findViewById(R.id.tstore_button_04); 151 | 152 | btn01.setOnClickListener(new View.OnClickListener() { 153 | @Override 154 | public void onClick(View v) { 155 | appStore = OneStoreApp.newInstance(); 156 | Toast.makeText(ctx, "OneStore app is installed: " + appStore.isInstalled(ctx), Toast.LENGTH_SHORT).show(); 157 | } 158 | }); 159 | 160 | 161 | btn02.setOnClickListener(new View.OnClickListener() { 162 | @Override 163 | public void onClick(View v) { 164 | appStore = OneStoreApp.newInstance(); 165 | appStore.openApp(ctx, "0000035733"); 166 | } 167 | }); 168 | 169 | btn03.setVisibility(View.INVISIBLE); 170 | /* 171 | btn03.setOnClickListener(new View.OnClickListener() { 172 | @Override 173 | public void onClick(View v) { 174 | publisherAppOpener = PlayAppStore.newInstance(); 175 | publisherAppOpener.openPublisherApps(ctx, "Google Inc."); 176 | } 177 | }); */ 178 | 179 | btn04.setVisibility(View.INVISIBLE); 180 | /* 181 | btn04.setOnClickListener(new View.OnClickListener() { 182 | @Override 183 | public void onClick(View v) { 184 | appStore = OneStoreApp.newInstance(); 185 | appStore.searchApp(ctx, "T map"); 186 | } 187 | }); */ 188 | } 189 | 190 | } 191 | -------------------------------------------------------------------------------- /Demo/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 17 | 18 | 24 | 25 | 30 | 31 |