I have to show the rating popup in app on 3 minutes of an application it may be on any screen.
I started the timer in SessionManager and sent callback to activities
public void startTimer(Context context) {
handler.postDelayed(() -> {
Intent intent = new Intent("SHOW_RATING_POPUP");
context.sendBroadcast(intent);
}, 180000);
}
Broadcast listener of rating popup as below:
private void ratingListener() {
IntentFilter intentFilter = new IntentFilter("SHOW_RATING_POPUP");
broadcastReceiverTab = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
showRateApp(context);
}
};
context.registerReceiver(broadcastReceiverTab, intentFilter);
}
I received dialog once but not able to get dialog on some android devices like realme and Moto. There are some quotas mentioned on Google docs but I wonder how can I solve this.