推送能在日志里面看到接收到了 但是后边会报错导致MessageReceiver无法收到推送消息 已经参考https://help.aliyun.com/knowledge_detail/67398.html 但是还是报错 2020-09-08 17:14:03.555 2759-2759/package E/MPS:CustomNotificationBuilder: no corresponding custom notificaiton 2020-09-08 17:14:03.558 2759-2759package E/EMASNAccs.AgooPushHandler: Notify message error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.alibaba.sdk.android.push.notification.BasicCustomPushNotification.isBuildWhenAppInForeground()' on a null object reference at com.alibaba.sdk.android.push.notification.d.a(Unknown Source:30) at com.alibaba.sdk.android.push.MessageReceiver.showNotificationNow(Unknown Source:0) at com.aliyun.ams.emas.push.a.a(Taobao:104) at com.aliyun.ams.emas.push.AgooMessageReceiver.onReceive(Taobao:44) at com.alibaba.sdk.android.push.MessageReceiver.onReceive(Unknown Source:0) at android.app.ActivityThread.handleReceiver(ActivityThread.java:3413) at android.app.ActivityThread.access$1300(ActivityThread.java:201) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1685) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:201) at android.app.ActivityThread.main(ActivityThread.java:6821) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
发现问题:在android端没有设置自定义Notification的情况下 后端不能要设置pushRequest.setAndroidNotificationBarType(1);//设置的通知样式ID,通知栏自定义样式范围0-100,否则报错,阿里云推送sdk需要优化这里的代码
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。