File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
android/src/main/java/cn/jpush/reactnativejpush Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ private static void sendEvent() {
163163 WritableMap map = Arguments .createMap ();
164164 map .putInt ("id" , mCachedBundle .getInt (JPushInterface .EXTRA_NOTIFICATION_ID ));
165165 map .putString ("message" , mCachedBundle .getString (JPushInterface .EXTRA_MESSAGE ));
166+ map .putString ("content" , mCachedBundle .getString (JPushInterface .EXTRA_MESSAGE ));
167+ map .putString ("content_type" , mCachedBundle .getString (JPushInterface .EXTRA_CONTENT_TYPE ));
168+ map .putString ("title" , mCachedBundle .getString (JPushInterface .EXTRA_TITLE ));
166169 map .putString ("extras" , mCachedBundle .getString (JPushInterface .EXTRA_EXTRA ));
167170 mRAC .getJSModule (DeviceEventManagerModule .RCTDeviceEventEmitter .class )
168171 .emit (mEvent , map );
@@ -177,7 +180,7 @@ private static void sendEvent() {
177180 .emit (mEvent , map );
178181 break ;
179182 }
180-
183+
181184 mEvent = null ;
182185 mCachedBundle = null ;
183186 }
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ export default class App extends Component {
228228
229229 JPushModule . addReceiveCustomMsgListener ( map => {
230230 this . setState ( {
231- pushMsg : map . message
231+ pushMsg : map . content
232232 } )
233233 console . log ( 'extras: ' + map . extras )
234234 } )
You can’t perform that action at this time.
0 commit comments