Have you tried just launching the activity from elsewhere to see if it actually works at all? (For example you can use the am command to launch an activity.)
Fwiw, you don't want to use the Theme.Activity.Alert style. Actually that shouldn't even be part of the SDK, so I'm not sure how you are using it at all. (And if you are not using the SDK, you should not be here, but in android-porting.) On Wed, Apr 8, 2009 at 11:34 PM, Devin Yu <deviny...@gmail.com> wrote: > > Dears, > > I've a problem and would like somebody help me. > > When MountService received event from HAL and start a notification, > it would display an AlertActivity after user's click. > However, I found the AlertActivity is created and can't be displayed. > > I got some log as below, > > 06-01 19:17:56.178: INFO/ActivityManager(934): Starting activity: > Intent { comp={android/com.android.internal.app.UsbStorageActivity} } > 06-01 19:17:56.178: WARN/ActivityManager(934): startActivity called > from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: > Intent { flags=0x800000 comp={android/ > com.android.internal.app.UsbStorageActivity} } > 06-01 19:17:56.278: DEBUG/Mount(934): USB activity create > 06-01 19:17:56.278: DEBUG/Mount(934): USB activity Resume > 06-01 19:17:56.308: VERBOSE/ActivityThread(934): Resuming > ActivityRecord{43936620 token=HistoryRecord{43933848 {android/ > com.android.internal.app.UsbStorageActivity}} {android/ > com.android.internal.app.UsbStorageActivity}} with isForward=true > 06-01 19:17:56.378: DEBUG/Mount(934): USB activity Pause > > and its description in AndroidManifest.xml is as below, > <activity > android:name="com.android.internal.app.UsbStorageActivity" > android:theme="@style/Theme.Dialog.Alert" > android:excludeFromRecents="true"> > </activity> > > Is it related to "FLAG_ACTIVITY_NEW_TASK"? however, how to solve it? > > I've tried to use "launchmode as singleTask", but is doesn't work. > > Is there anyone give me a hand? > Why my activity can be created but can't be displayed? > > I'm appreciated for your help. > > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---