質問

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?

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top