Reputation: 1562
What is the way to create a popup screen that's opened from a background service while app is not running in foreground?
Refer to the Skype answer-reject dialog when there's an incoming call:
I have a background service that always runs even the app is not visible to user, but how can I pop up a screen like in the image from that service?
I am looking for the term used for this kind of screens, is it a regular activity started from the service, or some form of "notification" ?
Upvotes: 0
Views: 3032
Reputation: 676
This popup shows exactly that.
You can start an Activity with:
android:theme="@android:style/Theme.Dialog"
Do Read: If I can remember properly, I have read somehwere that it is against the Android guidline of using popup from a service. It recommends using a Notification service.
Upvotes: 1