Correct. Keep in mind though, that, except for some specific cases (an alarm clock and the like), this -- an activity popping out of nowhere -- can be an unexpected and jarring experience for the user.
I can see it as a plot device for Final Destination 6: someone's bleeding to death, trying to call 911 on his Android phone, and is interrupted by a popup window: "5 days to Jane's birthday". Cut to black. :) -- Kostya 29 января 2012 г. 21:41 пользователь Rudolf Polzer <[email protected]>написал: > The LogCat contents after the crash is > > ERROR/AndroidRuntime(19994): java.lang.RuntimeException: Unable to start > receiver irp.plan.OnAlarmReceiver: android.util.**AndroidRuntimeException: > Calling startActivity() from outside of an Activity context requires the > FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? > ... > ERROR/AndroidRuntime(19994): Caused by: > android.util.**AndroidRuntimeException: > Calling startActivity() from outside of an Activity context requires the > FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? > > So I guess I have to add the FLAG_ACTIVITY_NEW_TASK flag to the intent to > start the activity, because the startActivity() is called from inside the > message receiver OnAlarmReceiver. > > > Am 29.01.2012 16:09, schrieb Kostya Vasilyev: > > Press F8 (Resume) in Eclipse a few times until you get the crash dialog >> on the device. >> >> Then check the logcat. >> >> Look for the part after "Caused by:" >> >> -- Kostya >> >> 29.01.2012 15:21, Rudolf Polzer пишет: >> >>> The manifest file contains >>> <activity android:name=".WakeActivity"><**/activity> >>> within the<application> tag. >>> >>> The stack is >>> ActivityThread.handleReceiver(**ActivityThread$ReceiverData) line: >>> 2639 >>> ActivityThread.access$3100(**ActivityThread, ActivityThread >>> $ReceiverData) line: 119 >>> ActivityThread$H.**handleMessage(Message) line: 1913 >>> ActivityThread$H(Handler).**dispatchMessage(Message) line: 99 >>> Looper.loop() line: 123 >>> >> >> > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to > android-developers@**googlegroups.com<[email protected]> > To unsubscribe from this group, send email to > android-developers+**[email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

