Play store policy says that if we notify users to perform some action in our app, then we must also let users cancel the operation if the user doesn’t want to perform that action. So if we ask users to update the app or rate the app on the Play store with Yes(Now), then we must also give an option for No(Later, Not Now), etc.
rateButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
r.showDefaultDialog();
}
});
where r is a class which contain showDefaultDialog method
public void showDefaultDialog() {
//Log.d(TAG, "Create default dialog.");
String title = "Enjoying Live Share Tips?";
String loveit = "Love it";
String likeit = "Like it";
String hateit = "Hate it";
new AlertDialog.Builder(hostActivity)
.setTitle(title)
.setIcon(R.drawable.ic_launcher)
//.setMessage(message)
.setPositiveButton(hateit, this)
.setNegativeButton(loveit, this)
.setNeutralButton(likeit, this)
.setOnCancelListener(this)
.setCancelable(true)
.create().show();
}
To download a full example[androidAone]:http://androidaone.com/11-2014/notify-users-rate-app-playstore/