getIntent() Extras always NULL

前端 未结 5 2261
南方客
南方客 2020-11-27 03:19

I wrote a simple Android App that show a custom Notification like this:

Context context = getApplicationContext();          
NotificationManager manager = (N         


        
5条回答
  •  面向向阳花
    2020-11-27 03:57

    Since it seems your activity is already running, I think you need to specify FLAG_UPDATE_CURRENT, otherwise the getIntent() call will return the previous one. See this answer.

提交回复
热议问题