I have an app, that send SMS when button is clicked. After thet I am expecting a answer SMS, so it goes like this:
So can i start new activity from BroadcastReceiver
after recived SMS is proccessed?
from receiver you can start the activity like this:
Intent launch = new Intent(context, ActivityToLaunch.class);
launch.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(launch);
Answer is Yes. You can start an activity in your BroadcastReceiver
.
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.