Question

In my app I have a service which has a BroadcastReceiver which listens to TIME_TICK. I already could check if a date is reached. So if for excemple the 04.01.2011 11:00 pm is reached there is a vibration alarm. But how could I open a dialog so that after I unlocked my screen it is shown?

Était-ce utile?

La solution

Launch an intent for an activity when the time is reached.

Declare on the manifest a theme for this activity like:

android:theme="@android:style/Theme.Dialog"

and create a view for the activity just like the inside of a dialog, so you don't need to create an AlertDialog.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top