Closed zouminhua-1 closed 5 years ago
我通过JPushModule.hasPermission()返回的true表明应用有推送权限,并且我也可以获取到应用的registrationId,但是我通过极光开发者平台发送推送通知一直都是失败的,手机接收不到通知 版本 "react": "16.2.0", "react-native": "0.53.3", "jpush-react-native": "^2.5.3" "jcore-react-native": "^1.3.2" 代码: if (Platform.OS === 'android') { JPushModule.notifyJSDidLoad((resultCode) => { if (resultCode === 0) { } }); } else { JPushModule.setupPush(); } // 获取当前极光开发者信息 JPushModule.getInfo((map) => { console.info('jpush user info:', map); }); JPushModule.hasPermission( res => { console.info('jpush hasPermission:', res); }) JPushModule.getRegistrationID((registrationId) => { console.info('jpush registrationId:', registrationId); }) // 设备初次向平台进行注册时会回调 this.getRegistrationIdEvent = JPushModule.addGetRegistrationIdListener((registrationId) => { console.info(Device register succeed, registrationId ${registrationId}); }); // 透传消息,message不会显示在通知栏 this.receiveCustomMsgEvent = JPushModule.addReceiveCustomMsgListener((map) => { console.info(map); }); // 接受到推送通知的事件回调 this.receiveNotificationEvent = JPushModule.addReceiveNotificationListener((map) => { console.info('ReceiveNotificationListener', map); });
我通过JPushModule.hasPermission()返回的true表明应用有推送权限,并且我也可以获取到应用的registrationId,但是我通过极光开发者平台发送推送通知一直都是失败的,手机接收不到通知
Device register succeed, registrationId ${registrationId}
我通过JPushModule.hasPermission()返回的true表明应用有推送权限,并且我也可以获取到应用的registrationId,但是我通过极光开发者平台发送推送通知一直都是失败的,手机接收不到通知
版本 "react": "16.2.0", "react-native": "0.53.3", "jpush-react-native": "^2.5.3" "jcore-react-native": "^1.3.2" 代码: if (Platform.OS === 'android') { JPushModule.notifyJSDidLoad((resultCode) => { if (resultCode === 0) { } }); } else { JPushModule.setupPush(); } // 获取当前极光开发者信息 JPushModule.getInfo((map) => { console.info('jpush user info:', map); }); JPushModule.hasPermission( res => { console.info('jpush hasPermission:', res); }) JPushModule.getRegistrationID((registrationId) => { console.info('jpush registrationId:', registrationId); }) // 设备初次向平台进行注册时会回调 this.getRegistrationIdEvent = JPushModule.addGetRegistrationIdListener((registrationId) => { console.info(Device register succeed, registrationId ${registrationId}
); }); // 透传消息,message不会显示在通知栏 this.receiveCustomMsgEvent = JPushModule.addReceiveCustomMsgListener((map) => { console.info(map); }); // 接受到推送通知的事件回调 this.receiveNotificationEvent = JPushModule.addReceiveNotificationListener((map) => { console.info('ReceiveNotificationListener', map); });