Android Question Call a specific activity when i click to push notification in the bar

Fabio Campanella

Member
Licensed User
Longtime User
Is possible to do it?
When the app is in background state, i receive a push notification in the bar.
The push message contains a data section with some data.

If I click the push message, i would like to read the custom data and i would like to open the specific activity with this.

Is possible?

Thanks for your help!

Fabio
 

monic

Active Member
Licensed User
Longtime User
Upvote 0

Fabio Campanella

Member
Licensed User
Longtime User
I've resolved with this:

B4X:
Dim i As Intent = Activity.GetStartingIntent
Dim a As String = i.GetExtra("guid") ' This is a var that I've passed in the notification data payload
Msgbox(a, "Push")

I've called this in the Activity_Resume and I read "guid" var correctly. In this mode I can choose any action to do..

This work if the app is in background or not running.

Great!!!
 
Upvote 0
Top