Coder Social home page Coder Social logo

appunite / android-rate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hotchemi/android-rate

0.0 20.0 0.0 566 KB

Library to help you promote your app by prompting users to rate the app after using it for a few days.

Home Page: http://hotchemi.github.io/Android-Rate

License: Apache License 2.0

Groovy 21.78% Shell 29.63% Java 48.59%

android-rate's Introduction

Android-Rate

Build Status Bitdeli Badge

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

Download

Download from maven central.

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

ChangeLog

  • 2014/02/12 0.0.2 release.
  • 2014/02/13 0.0.3 release.
  • 2014/04/07 0.0.4 release.
  • 2014/04/12 0.0.5 release.

Sample

Please try to move the sample.

How to use

Implementation

Call AppRate.monitor(Context) and AppRate.showRateDialogIfMeetsConditions(Context) in your launcher activity.

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  // Monitor launch times and duration of feeding period from installation
  AppRate.monitor(this);
  // Show a dialog if meets conditions
  AppRate.showRateDialogIfMeetsConditions(this);
}

Custom conditions

The default conditions to show rate dialog is as below:

  • App is launched more than 10 times.
  • App is launched more than 10 days later than installation.

If you want to use your own condition, please call AppRate.setLaunchTimes(int) and AppRate.setInstallDays(int).

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // Monitor launch times and duration of feeding period from installation
    AppRate.setInstallDays(0) // default 10, 0 means install day.
           .setLaunchTimes(3) // default 10
           .monitor(this);
    // Show a dialog if meets conditions
    AppRate.showRateDialogIfMeetsConditions(this);
}

Custom rate 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>

And if you want to decide whether neutral button is appeared, please call AppRate.setShowNeutralButton(boolean).

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // method chain
    AppRate.setInstallDays(0)
           .setShowNeutralButton(false) // default true
           .monitor(this);
}

Localization

Android-Rate currently supports the following languages:

  • English
  • Spanish
  • French
  • Chinese
  • Korean
  • Japanese
  • Vietnamese

Requirements

Supports Android 2.2 or greater.

Test

$ ./gradlew connectedCheck

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

Contributor

android-rate's People

Contributors

androhi avatar hoang8f avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.