├── .gitignore ├── AppRaterDemo ├── build.gradle ├── libs │ └── android-support-v4.jar ├── proguard-project.txt ├── project.properties └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── org │ │ └── codechimp │ │ └── appraterdemo │ │ └── MainActivity.java │ └── res │ ├── drawable-hdpi │ └── ic_launcher.png │ ├── drawable-mdpi │ └── ic_launcher.png │ ├── drawable-xhdpi │ └── ic_launcher.png │ ├── layout │ └── activity_main.xml │ ├── menu │ └── activity_main.xml │ ├── values-v11 │ └── styles.xml │ ├── values-v14 │ └── styles.xml │ └── values │ ├── strings.xml │ └── styles.xml ├── AppRaterLibrary ├── build.gradle ├── gradle.properties ├── proguard-project.txt ├── project.properties └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── org │ │ └── codechimp │ │ └── apprater │ │ ├── AmazonMarket.java │ │ ├── AppRater.java │ │ ├── ApplicationRatingInfo.java │ │ ├── GoogleMarket.java │ │ └── Market.java │ └── res │ ├── values-ar │ └── strings.xml │ ├── values-bg │ └── strings.xml │ ├── values-ca │ └── strings.xml │ ├── values-cs │ └── strings.xml │ ├── values-de │ └── strings.xml │ ├── values-es │ └── strings.xml │ ├── values-fa │ └── strings.xml │ ├── values-fr │ └── strings.xml │ ├── values-he │ └── strings.xml │ ├── values-hr │ └── strings.xml │ ├── values-hu │ └── strings.xml │ ├── values-id │ └── strings.xml │ ├── values-it │ └── strings.xml │ ├── values-iw │ └── strings.xml │ ├── values-ja │ └── strings.xml │ ├── values-ko │ └── strings.xml │ ├── values-nl │ └── strings.xml │ ├── values-pl │ └── strings.xml │ ├── values-pt-rBR │ └── strings.xml │ ├── values-pt │ └── strings.xml │ ├── values-ru │ └── strings.xml │ ├── values-sk │ └── strings.xml │ ├── values-sl │ └── strings.xml │ ├── values-sq │ └── strings.xml │ ├── values-sr │ └── strings.xml │ ├── values-sv │ └── strings.xml │ ├── values-th │ └── strings.xml │ ├── values-tr │ └── strings.xml │ ├── values-uk │ └── strings.xml │ ├── values-vi │ └── strings.xml │ ├── values-zh-rHK │ └── strings.xml │ ├── values-zh-rTW │ └── strings.xml │ ├── values-zh │ └── strings.xml │ └── values │ └── strings.xml ├── README.md ├── Screenshots ├── demo-dark.png └── demo-light.png ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── maven_push.gradle └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | gen/ 14 | 15 | # Local configuration file (sdk path, etc) 16 | local.properties 17 | signing.properties 18 | 19 | # Android Studio files 20 | *.iml 21 | out/ 22 | build/ 23 | .idea 24 | 25 | .gradle 26 | 27 | -------------------------------------------------------------------------------- /AppRaterDemo/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion rootProject.ext.compileSdkVersion 5 | 6 | defaultConfig { 7 | minSdkVersion 8 8 | targetSdkVersion 27 9 | versionName project.VERSION_NAME 10 | versionCode Integer.parseInt(project.VERSION_CODE) 11 | } 12 | 13 | lintOptions { 14 | disable 'MissingTranslation' 15 | } 16 | 17 | signingConfigs { 18 | release 19 | } 20 | 21 | buildTypes { 22 | if (isReleaseBuild()) { 23 | release { 24 | signingConfig signingConfigs.release 25 | } 26 | } 27 | 28 | debug { 29 | applicationIdSuffix ".debug" 30 | versionNameSuffix "-debug" 31 | } 32 | } 33 | } 34 | 35 | dependencies { 36 | compile project(':AppRaterLibrary') 37 | } 38 | 39 | 40 | def Properties props = new Properties() 41 | def propFile = file('signing.properties') 42 | if (propFile.canRead()){ 43 | props.load(new FileInputStream(propFile)) 44 | 45 | if (props!=null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') && 46 | props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')) { 47 | 48 | println 'RELEASE BUILD SIGNING' 49 | 50 | android.signingConfigs.release.storeFile = file(props['STORE_FILE']) 51 | android.signingConfigs.release.storePassword = props['STORE_PASSWORD'] 52 | android.signingConfigs.release.keyAlias = props['KEY_ALIAS'] 53 | android.signingConfigs.release.keyPassword = props['KEY_PASSWORD'] 54 | } else { 55 | println 'RELEASE BUILD NOT FOUND SIGNING PROPERTIES' 56 | 57 | android.buildTypes.release.signingConfig = null 58 | } 59 | }else { 60 | println 'RELEASE BUILD NOT FOUND SIGNING FILE' 61 | android.buildTypes.release.signingConfig = null 62 | } 63 | 64 | -------------------------------------------------------------------------------- /AppRaterDemo/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codechimp-org/AppRater/018d481b26ce6112a0f431e9e58e80e1745a63b6/AppRaterDemo/libs/android-support-v4.jar -------------------------------------------------------------------------------- /AppRaterDemo/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /AppRaterDemo/project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-18 15 | android.library.reference.1=../AppRater 16 | -------------------------------------------------------------------------------- /AppRaterDemo/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /AppRaterDemo/src/main/java/org/codechimp/appraterdemo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package org.codechimp.appraterdemo; 2 | 3 | import android.app.Activity; 4 | import android.os.Bundle; 5 | import android.view.Menu; 6 | import android.view.MenuInflater; 7 | import android.view.MenuItem; 8 | import android.view.View; 9 | import android.view.View.OnClickListener; 10 | import android.widget.Button; 11 | 12 | import org.codechimp.apprater.AppRater; 13 | 14 | public class MainActivity extends Activity { 15 | 16 | private Button buttonTest; 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_main); 22 | 23 | 24 | buttonTest = (Button) findViewById(R.id.button1); 25 | 26 | buttonTest.setOnClickListener(new OnClickListener() { 27 | public void onClick(View v) { 28 | 29 | // This forces display of the rate prompt. 30 | // It should only be used for testing purposes 31 | AppRater.showRateDialog(v.getContext()); 32 | } 33 | }); 34 | 35 | 36 | // Optionally you can set the Market you want to use prior to calling app_launched 37 | // If setMarket not called it will default to Google Play 38 | // Current implementations are Google Play and Amazon App Store, you can add your own by implementing Market 39 | // AppRater.setMarket(new GoogleMarket()); 40 | // AppRater.setMarket(new AmazonMarket()); 41 | 42 | // This will keep a track of when the app was first used and whether to show a prompt 43 | // It should be the default implementation of AppRater 44 | 45 | AppRater.setPackageName("com.johncrossley"); 46 | AppRater.app_launched(this); 47 | } 48 | 49 | @Override 50 | public boolean onCreateOptionsMenu(Menu menu) { 51 | MenuInflater inflater = getMenuInflater(); 52 | inflater.inflate(R.menu.activity_main, menu); 53 | return super.onCreateOptionsMenu(menu); 54 | } 55 | 56 | @Override 57 | public boolean onOptionsItemSelected(MenuItem item) { 58 | super.onOptionsItemSelected(item); 59 | switch (item.getItemId()) { 60 | case (R.id.menu_ratenow): { 61 | AppRater.rateNow(this); 62 | return true; 63 | } 64 | } 65 | return false; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AppRaterDemo/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codechimp-org/AppRater/018d481b26ce6112a0f431e9e58e80e1745a63b6/AppRaterDemo/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /AppRaterDemo/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codechimp-org/AppRater/018d481b26ce6112a0f431e9e58e80e1745a63b6/AppRaterDemo/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /AppRaterDemo/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codechimp-org/AppRater/018d481b26ce6112a0f431e9e58e80e1745a63b6/AppRaterDemo/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /AppRaterDemo/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 |