Open activity by clicking on the push notification from Parse

前端 未结 4 1087
抹茶落季
抹茶落季 2021-02-14 06:29

I want to receive a push notification from Parse and open an List activity and use intent.putextra(\"dataFromParse\") before starting the activity. I\'m able to receive the push

4条回答
  •  爱一瞬间的悲伤
    2021-02-14 07:15

    As per official Parse documentation on https://www.parse.com/docs/android/guide#push-notifications-customizing-notifications :

    If your push has no "uri" parameter, onPushOpen will invoke your application's launcher activity.

    So, the current accepted answer only takes into account the case where your push has no "uri" and it opens your MainActivity. If you want to open a concrete Activity, you can define an intent-filter for that Activity and send that intent-filter uri on your push.

提交回复
热议问题