I at some date and time when application not active show dialog (activity with Dialog theme; otherwise there is not possibility to do).
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
=> so when I start application after dialog showing through Home button(recent apps) DialogActivity
is opening instead of Application.
How can I make to open my application?