Android remoteMessage getData() possible? #7432
Unanswered
LNRS-iampnelson
asked this question in
Q&A
Replies: 1 comment
-
I was going to suggest a custom native module, looks like you are on the right track there.
The API you make in your custom module may have any signature you want, I suggest sending the map data type through which should allow the remote message JSON to fit through it, as I believe they have the same "shape" Alternatively, you could JSON.toString it and send it as a string ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is there a way to pass the received notification + data from JavaScript back to native Java to where I can leverage remoteMessage.getData()?
I would like to do something to the similar from the native Java side.
`
// Check if message contains a data payload.
if (remoteMessage.getData().size() > 0) {
Log.d(TAG, "Message data payload: " + remoteMessage.getData());
`
I can successfully pass the payload received from JavaScript to native via a module I created. But, how can I make the payload be the equivalent of remoteMessage. Is this possible?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions