Need Context when no activity is running

前端 未结 5 460
离开以前
离开以前 2021-01-26 08:16

I am displaying a pop up from Notification of my application.But when I check my notification no activity is running from my application so in notification when I show dialogue

5条回答
  •  一生所求
    2021-01-26 09:17

    you can make your dialog extend and Activity class and change its theme to dialog in the manifest file. in this case, you call notification.setLatestEventInfo(YourActivityDialog.this, contentTitle, contentText, contentIntent);.

提交回复
热议问题