Differential D7193 Diff 24569 native/android/app/src/main/java/app/comm/android/notifications/CommAndroidNotifications.java
Changeset View
Changeset View
Standalone View
Standalone View
native/android/app/src/main/java/app/comm/android/notifications/CommAndroidNotifications.java
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | public class CommAndroidNotifications extends ReactContextBaseJavaModule { | ||||
public void getInitialNotification(Promise promise) { | public void getInitialNotification(Promise promise) { | ||||
RemoteMessage initialNotification = | RemoteMessage initialNotification = | ||||
getCurrentActivity().getIntent().getParcelableExtra("message"); | getCurrentActivity().getIntent().getParcelableExtra("message"); | ||||
if (initialNotification == null) { | if (initialNotification == null) { | ||||
promise.resolve(null); | promise.resolve(null); | ||||
return; | return; | ||||
} | } | ||||
WritableMap jsReadableNotification = | WritableMap jsReadableNotification = | ||||
CommAndroidNotificationParser.parseRemoteMessageToJSForegroundMessage( | CommAndroidNotificationParser.parseRemoteMessageToJSMessage( | ||||
initialNotification); | initialNotification); | ||||
promise.resolve(jsReadableNotification); | promise.resolve(jsReadableNotification); | ||||
} | } | ||||
@ReactMethod | @ReactMethod | ||||
public void createChannel( | public void createChannel( | ||||
String channelID, | String channelID, | ||||
String name, | String name, | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |