File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
android/src/main/java/cn/jpush/reactnativejpush Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,9 @@ private static void sendEvent() {
162162 case RECEIVE_CUSTOM_MESSAGE :
163163 WritableMap map = Arguments .createMap ();
164164 map .putInt ("id" , mCachedBundle .getInt (JPushInterface .EXTRA_NOTIFICATION_ID ));
165- map .putString ("message" , mCachedBundle .getString (JPushInterface .EXTRA_MESSAGE ));
165+ map .putString ("content" , mCachedBundle .getString (JPushInterface .EXTRA_MESSAGE ));
166+ map .putString ("content_type" , mCachedBundle .getString (JPushInterface .EXTRA_CONTENT_TYPE ));
167+ map .putString ("title" , mCachedBundle .getString (JPushInterface .EXTRA_TITLE ));
166168 map .putString ("extras" , mCachedBundle .getString (JPushInterface .EXTRA_EXTRA ));
167169 mRAC .getJSModule (DeviceEventManagerModule .RCTDeviceEventEmitter .class )
168170 .emit (mEvent , map );
@@ -177,7 +179,7 @@ private static void sendEvent() {
177179 .emit (mEvent , map );
178180 break ;
179181 }
180-
182+
181183 mEvent = null ;
182184 mCachedBundle = null ;
183185 }
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