click on notification to go current activity

后端 未结 5 1439
借酒劲吻你
借酒劲吻你 2020-12-03 08:18

i am using this solution : How to make notification intent resume rather than making a new intent?

I works fine when i run my app normally.. however my app has a sha

5条回答
  •  醉梦人生
    2020-12-03 09:01

    for additional info, dont forget to add pending intent flag to make onNewIntent works!

    true:

    PendingIntent.getActivity(context, 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT)
    

    false:

    PendingIntent.getActivity(context, 0, resultIntent, 0)
    

    Please vote up if this benefit for you, cheers!

提交回复
热议问题