Skip to content Skip to sidebar Skip to footer

Android: How To Resume Application/activity From Broadcastreceiver?

If my procedure is following: Launch Activity A -> Activity B Press 'Home' button. Click on the application again. Result: 'Activity B' shows up (it resumes). Launch Activity

Solution 1:

My gosh, I made it working!!

Thank you for other answers you guys provided, but they weren't what I was looking for.

This will do the job:

Intenti= getPackageManager().getLaunchIntentForPackage("com.your.package.name");
i.setFlags(0);
i.setPackage(null);
startActivity(i);

Solution 2:

check out this

set flags to your intent Intent.FLAG_ACTIVITY_REORDER_TO_FRONT and

Intent.FLAG_ACTIVITY_NEW_TASK as following

intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT|Intent.FLAG_ACTIVITY_NEW_TASK);

Post a Comment for "Android: How To Resume Application/activity From Broadcastreceiver?"