开发者

Android: How to catch Intent's Extras if the activity is already running?

I put a notification in the status bar with a PendingIntent (with Extras 开发者_如何学Goinfo) that points to my main app (main activity). When the user clicks the staus bar, the PendingIntent is fired and my app launches and I can read the Extras info in my onCreate() method. So far so good.

But if my app is already running, the PendingIntent simply causes the app to come to the foreground and it does not call any of my methods, so I can't read the content in Extras. What can I do?

Thanks!


It does call a method.

Check out OnNewIntent

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜