Rate Me is an Android 2.3+ library that shows dialog to suggest the user to rate the application in the Google Play Store.
With a little twist: if the rating is positive, we take the user to the Play Store directly. Otherwise, we ask him for feedback via email. (This is all configurable.)
- Download and extract the ZIP file
- Import the sources: File > Import > Existing projects into workspace > Select directory > add
LibraryRateMe
- Add it as a library: Right click on your project > Android > Library: Add > LibraryRateMe
Add this to your project's build.gradle file:
dependencies {
compile 'com.androidsx:ratemelib:X.Y.Z@aar'
}
You can see the last version in Maven Central
Have a look at the sample code or check out a simple integration:
new DialogRateMe.Builder(context)
.setLogoResourceId(R.drawable.ic_launcher)
.setGoToMail(true)
.setEmail(getString(R.string.support_email))
.setShowShareButton(false)
.build()
.show(getFragmentManager(), "dialog");
The full list of options is:
new DialogRateMe.Builder(this)
.setDialogColor(Color.WHITE)
.setIconCloseColorFilter(Color.DKGRAY)
.setLineDividerColor(Color.BLUE)
.setLogoResourceId(R.drawable.ic_launcher)
.setRateButtonBackgroundColor(Color.BLUE)
.setRateButtonPressedBackgroundColor(Color.RED)
.setRateButtonTextColor(Color.WHITE)
.setGoToMail(true)
.setShowOKButtonByDefault(false)
.setEmail("[email protected]")
.setShowShareButton(false)
.setTextColor(Color.BLUE)
.setTitleBackgroundColor(Color.WHITE)
.setTitleTextColor(Color.BLUE)
.build()
.show(getFragmentManager(), "dialog");
In case you want the dialog to appear based on the number of times the app has been opened or the install date, have a look at this example:
@Override
protected void onStart() {
super.onStart();
final int launchTimes = 3;
final int installDate = 7;
new RateMeDialogTimer(installDate, launchTimes);
RateMeDialogTimer.onStart(this);
if (RateMeDialogTimer.shouldShowRateDialog(this)) {
// show the dialog with the code above
}
}
Copyright 2014 Lucas Ponzoda
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific