Refreshing activity on receiving gcm push notification

后端 未结 7 1303
自闭症患者
自闭症患者 2020-11-29 16:45

Update: GCM is deprecated, use FCM

How to refresh activity on receiving gcm push notification<

7条回答
  •  执念已碎
    2020-11-29 17:37

    Seems there is an easier way. In the OnMessageReceived method of the GCM Listener, you can just do the update from there instead of sending the notification. You can use the same code you would have used if processing the notification. If you're doing StartActivity from the listener, you have to use the ActivityFlags.NewTask flag.

提交回复
热议问题