• Stars
    star
    722
  • Rank 62,738 (Top 2 %)
  • Language
    Java
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android-Rate is a library to help you promote your android app by prompting users to rate the app after using it for a few days.

Android-Rate

Build Status

Android-Rate is a library to help you promote your android app by prompting users to rate the app after using it for a few days.

screen shot

Install

You can download from maven central.

${latest.version} is Maven Badges

dependencies {
  compile 'com.github.hotchemi:android-rate:{latest.version}'
}

Usage

Configuration

Android-Rate provides methods to configure its behavior.

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);

  AppRate.with(this)
      .setInstallDays(0) // default 10, 0 means install day.
      .setLaunchTimes(3) // default 10
      .setRemindInterval(2) // default 1
      .setShowLaterButton(true) // default true
      .setDebug(false) // default false
      .setOnClickButtonListener(new OnClickButtonListener() { // callback listener.
          @Override
          public void onClickButton(int which) {
              Log.d(MainActivity.class.getName(), Integer.toString(which));
          }
      })
      .monitor();

  // Show a dialog if meets conditions
  AppRate.showRateDialogIfMeetsConditions(this);
}

The default conditions to show rate dialog is as below:

  1. App is launched more than 10 days later than installation. Change via AppRate#setInstallDays(int).
  2. App is launched more than 10 times. Change via AppRate#setLaunchTimes(int).
  3. App is launched more than 2 days after neutral button clicked. Change via AppRate#setRemindInterval(int).
  4. App shows neutral dialog(Remind me later) by default. Change via setShowLaterButton(boolean).
  5. To specify the callback when the button is pressed. The same value as the second argument of DialogInterface.OnClickListener#onClick will be passed in the argument of onClickButton.
  6. Setting AppRate#setDebug(boolean) will ensure that the rating request is shown each time the app is launched. This feature is only development!.

Clear show dialog flag

When you want to show the dialog again, call AppRate#clearAgreeShowDialog().

AppRate.with(this).clearAgreeShowDialog();

When the button presses on

call AppRate#showRateDialog(Activity).

AppRate.with(this).showRateDialog(this);

Set custom view

call AppRate#setView(View).

LayoutInflater inflater = (LayoutInflater)this.getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.custom_dialog, (ViewGroup)findViewById(R.id.layout_root));
AppRate.with(this).setView(view).monitor();

Custom dialog

If you want to use your own dialog labels, override string xml resources on your application.

<resources>
    <string name="rate_dialog_title">Rate this app</string>
    <string name="rate_dialog_message">If you enjoy playing this app, would you mind taking a moment to rate it? It won\'t take more than a minute. Thanks for your support!</string>
    <string name="rate_dialog_ok">Rate It Now</string>
    <string name="rate_dialog_cancel">Remind Me Later</string>
    <string name="rate_dialog_no">No, Thanks</string>
</resources>

Language

Android-Rate currently supports the following languages:

  • English
  • Czech
  • German
  • Spanish
  • Basque
  • Persian
  • French
  • Italy
  • Hebrew
  • Japanese
  • Korean
  • Polish
  • Portuguese
  • Russian
  • Turkish
  • Ukrainian
  • Vietnamese
  • Chinese

Support

Android-Rate supports API level 9 and up.

Sample

Please try to move the sample.

Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Repositories

1

awesome-android-testing

A curated list of awesome android testing libraries.
745
star
2

khronos

An intuitive Date extensions in Kotlin.
Kotlin
327
star
3

gradle-proguard-plugin

The gradle plugin to add proguard snippets to your proguard setting file quickly.
Groovy
86
star
4

LruCache

A tiny memory cache implementation which uses a LRU policy.
Java
76
star
5

ProgressMenuItem

Shows and stop a progress in the ActionBar.
Java
75
star
6

Scre

A lightweight screen recorder macOS application written in SwiftUI.
Swift
70
star
7

tiamat

Reactive SharedPreferences code generator for Android.
Java
69
star
8

StringPicker

StringPicker is a library to provides a custom view and dialog fragment to pick string value.
Java
50
star
9

m-permissions-checker

You can check whether you have to handle your app permission or not in Android M.
Python
49
star
10

awesome-recruit-engineer-careers

リクルートグループのエンジニア採用情報
46
star
11

mvns

CLI tool to search library in maven central repository
Python
20
star
12

wearzaim

Zaim Android Wear Client.
Java
17
star
13

zaim.js

Node.js library for the Zaim API.
TypeScript
16
star
14

kotlin-compiler-plugin-example

Kotlin
14
star
15

vscode-find-pr

A vscode plugin jumps to pull request url.
TypeScript
13
star
16

IdeaTweet

simple tweet plugin for jetbrains ide.
Java
10
star
17

deploygate-maven-plugin

DeployGate plugin for maven.
Java
6
star
18

redpen-android

RedPen android client(unofficial).
Java
5
star
19

android.casual

5
star
20

picasso-helper

DEPRECATED
Java
4
star
21

private.js

Provides private accessor to javascript object.
JavaScript
4
star
22

youroom4j

youRoom4J is a Java library for the youRoom API.
Java
3
star
23

zaim-cli

CLI based Zaim client
JavaScript
2
star
24

surl

Shorten an url in your clipboard.
Go
2
star
25

EasyButton

Custom button set background color easily.
Shell
2
star
26

HeckelDiff

Kotlin
2
star
27

tqkey-groovy

Groovy
2
star
28

goodjob_notifier

JavaScript
1
star
29

Pio

Twitter client focus only on tweet
JavaScript
1
star
30

everRoom

save daily yourrom to evernote.
CSS
1
star
31

NetImageView

Java
1
star
32

clasp-template

TypeScript
1
star
33

performance-list-manipulation

Java
1
star