stavros.3p
stavros.3p

Reputation: 2324

Determine if android app is opened from GCM notification message

When I reboot the device or kill the app I don't have control over the Intent properties, so I can't add an ID.

How to know if the app starts from a gcm notification message?

Upvotes: 0

Views: 116

Answers (1)

Mitesh Machhoya
Mitesh Machhoya

Reputation: 434

when you send GCM notification from the server or from GCM firebase console you can set key value pair. that key you will get in Intent, so once you get key then you can easily identify app open from GCM notification.

you can get intent using getIntent()

Upvotes: 1

Related Questions