I have set a alarm through alarm manager to start a IntentService on a specific time.
In IntentService running some checks and starting an Intent to activity JobDetails.
In JobDetails clicking on a button leads to another activity JobField. On completing the JobField -> JobListing is opened.
JobListing is a ListView activity which consist of all the jobs. On clicking a list item ie job, JobDetails is opened.
Flow
Application does not exist in recent apps.
AlarmManger triggers -> IntentService -> JobDetails -> JobField -> JobListing -> JobDetails
The last intent doest start my JobDetails activity.
Entry in logcat
Activity_launch_request id:com.xx.app time:105238474
Code
IntentService
Intent intent = new Intent(context, JobDetails.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(intent);
JobListing
Intent intent = new Intent(context, JobDetails.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
将JobDetails添加到您在AndroidManifest.xml中的活动清单中,然后使用getActivity()作为上下文
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.