Starting a View from a Service?

后端 未结 6 1476
攒了一身酷
攒了一身酷 2020-12-10 17:52

Already asked a similar question, yet without much luck.

Suppose I have a service and I need a view to pop up above it. In the same time, they both should be intract

6条回答
  •  萌比男神i
    2020-12-10 18:14

    Services run in the background and do not have an UI. So you can not show something over a Service.

    If you need a Service to notify user about something, then use Notification.

    Ayou could use a Toast, but I advise against it, as it can confuse users since it can pop-out over another app's activity.

提交回复
热议问题