In my Broadcaster Receiver,
I have this set:
//Intent that enables the view to pop up when alarm goes off
Intent i = new Intent();
i.setClassName("com.example.Device.MainActivity", "com.example.Device.OtherActivity");
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
and in my notification service, I have this:
// First let's define the intent to trigger when notification is selected
// Start out by creating a normal intent (in this case to open an activity)
intent = new Intent(this, OtherActivity.class);
For some reason, when the notification goes off, the activity that I want to pop up does not pop up when alarm rings.
How can I pop up my activity when the alarm goes off/rings? I have done it before but I changed something in my code to mess it up.
0 comments:
Post a Comment