I have a translucent AlertDialog set to show if the user receives a text message. It is being started from a Broadcast Receiver.
The user only gets this “emergency” type of message, only if the sender sets it as such a message and the user enables this type of interruption.
I have a slight problem because if my application is running, my background is what my application last left off at. The only way I get the background to show what the user is “currenty doing” is by completely closing my app.
Has anyone run into a similar issue using AlertDialogs with a translucent background?
here is how I start my activity;
Intent i = new Intent(context, LayoutStartActivity.class);
i.putExtras(intent);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
and here is a stripped down version of my alert dialog
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(holder);
builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
finish();
}
});
Thanks
Set the task affinity in the AndroidManifest.xml so that it runs as a unique process on the recents stack.
Example