I am at some point and time when the application is not actively displaying a dialogue (activity with the theme of the dialogue, otherwise there is no way to do it).
if (!Utils.isApplicationInForeground(context)) { Intent i = new Intent(context, DialogActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(i); }
Intent.FLAG_ACTIVITY_NEW_TASK => therefore, when I launch the application after opening the dialog using the "Home" button (recent applications), DialogActivity opens instead of the application.
How can I open the application?
drifter
source share