Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Add FCM data to the data key #510

Merged
merged 2 commits into from
Oct 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified platforms/android/firebase-release.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ public void onMessageReceived(RemoteMessage remoteMessage) {
}

final Map<String, String> data = remoteMessage.getData();
final JSONObject data_json = new JSONObject();
for (Map.Entry<String, String> stringStringEntry : data.entrySet()) {
json.put(stringStringEntry.getKey(), stringStringEntry.getValue());
data_json.put(stringStringEntry.getKey(), stringStringEntry.getValue());
}
json.put("data", data_json);

FirebasePlugin.executeOnNotificationReceivedCallback(json.toString());
} catch (JSONException e) {
Expand Down