diff --git a/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java b/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java index 380760a87..4786c3d0b 100644 --- a/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java +++ b/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java @@ -27,6 +27,11 @@ public class RNPushNotificationListenerService extends GcmListenerService { @Override public void onMessageReceived(String from, final Bundle bundle) { JSONObject data = getPushData(bundle.getString("data")); + // Copy `twi_body` to `message` to support Twilio + if (bundle.containsKey("twi_body")) { + bundle.putString("message", bundle.getString("twi_body")); + } + if (data != null) { if (!bundle.containsKey("message")) { bundle.putString("message", data.optString("alert", "Notification received"));