We have an alert screen that warns the user of a problem they need to fix.
I have been given a task to make this alert re-appear if the user hits the home button and goes about their business. (This is a critical problem that needs to be fixed.)
So I added this code to the onPause event:
Handler handler = new Handler();
handler.postDelayed(new Redisplay(), REDISPLAY_DELAY);
Which will give the user about 10 seconds and then run this:
private class Redisplay implements Runnable {
@Override
public void run() {
log.fatal("Redisplaying:" + ending);
if(!ending){
Intent intent = new Intent(getApplicationContext(), UntetheredAlertActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
}
}
}
Only this doesn't make my application the current application. Does anyone know how to do this?