I used the timer method in the Activity class. In this method, I have an intent from the Activity class to the BroadcastReceiver class.
This BroadcastReceiver class will call every 15 minutes in the background using the AlarmManager .
When I call the BroadcastReceiver class, I would like to raise the AlertDialog .
public void timerMethod(){ Intent intent = new Intent(Activity.this, BroadcastReceiverClass.class ); PendingIntent sender = PendingIntent.getBroadcast( QualityCallActivity.this,0, intent, 0 );
BroadcastReceiverClass.java
public void onReceive(Context context, Intent intent) { dialogMethod(); }
How can I raise the AlertDialog class from BroadcastReceiver from the background process?
source share