Skip to content

Commit 30af366

Browse files
authored
Merge pull request #61 from benlime/master
uses “google.message_id” instead of “id”
2 parents fe1dc56 + 9e3306e commit 30af366

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

android/src/main/java/com/azure/reactnative/notificationhub/ReactNativeNotificationsHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private void sendNotification(Bundle bundle) {
9999
return;
100100
}
101101

102-
String notificationIdString = bundle.getString("id");
102+
String notificationIdString = bundle.getString("google.message_id");
103103
if (notificationIdString == null) {
104104
Log.e(TAG, "No notification ID specified for the notification");
105105
return;
@@ -223,7 +223,7 @@ private void sendNotification(Bundle bundle) {
223223
}
224224
}
225225

226-
int notificationID = Integer.parseInt(notificationIdString);
226+
int notificationID = notificationIdString.hashCode();
227227

228228
PendingIntent pendingIntent = PendingIntent.getActivity(context, notificationID, intent,
229229
PendingIntent.FLAG_UPDATE_CURRENT);

0 commit comments

Comments
 (0)