How do I pass data from a BroadcastReceiver through to an Activity being started?

前端 未结 5 550
我寻月下人不归
我寻月下人不归 2020-12-02 23:56

I\'ve got an Android application which needs to be woken up sporadically throughout the day.

To do this, I\'m using the AlarmManager to set up a PendingIntent and ha

5条回答
  •  情深已故
    2020-12-03 00:38

    Just override the onNewIntent like this and the Bundle var will be available in the onresume method:

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
    }
    

提交回复
热议问题