show pop-up from background service in android

后端 未结 1 1424
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 10:31

Hi it is possible in android to show pop-up dialog from background running service? and answer is positive than how can i do that

相关标签:
1条回答
  • 2021-01-14 11:30

    There are several options. You can use a theme and make an activity look and behave like a dialog (as in this question) by setting the android:theme attribute of your <activity> to @android:style/Theme.Dialog or a customized theme in your manifest.

    Alternatively, you could create a translucent activity by setting the theme to @android:style/Theme.Translucent.NoTitleBar and then launch a regular dialog from the activity. As the comments on one of the answers to the question advise, in this case just make sure to finish() the translucent activity whenever the dialog is dismissed.

    0 讨论(0)
提交回复
热议问题