Android如果不自定Receiver,怎么拿到后台发送过来的数据


(Android 唐鹏) #1

Android如果不自定Receiver,怎么拿到后台发送过来的数据


#2

没办法获取。


(Android 唐鹏) #3

您好:

05-24 13:02:43.491 3046-3659/? I/ActivityManager: filter receiver for action = cn.jpush.android.intent.MESSAGE_RECEIVED
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ╔════════════════════════════════════════════════════════════════════════════════════════
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ║ Thread: main
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ╟────────────────────────────────────────────────────────────────────────────────────────
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ║ MyJpushReceiver.onReceive  (MyJpushReceiver.java:33)
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ║    MyJpushReceiver.printBundle  (MyJpushReceiver.java:88)
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ╟────────────────────────────────────────────────────────────────────────────────────────
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ║ This message has no Extra data
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/PRETTYLOGGER-JPush: ╚════════════════════════════════════════════════════════════════════════════════════════
05-24 13:02:43.491 14459-14459/com.meistreet.megao I/JPush: processCustomMessage: 
05-24 13:02:43.501 14459-14530/com.meistreet.megao I/System: core_booster, getBoosterConfig = false
05-24 13:02:43.521 14459-14530/com.meistreet.megao I/System: core_booster, getBoosterConfig = false
05-24 13:02:44.161 3455-3455/? I/wpa_supplicant: wlan0: HEART-BEAT-ACK: 1090

我能在日记文件中看到,按时不能收到通知为什么


#4

不太明白你的意思,这里[quote=“Android3, post:3, topic:17374”]
cn.jpush.android.intent.MESSAGE_RECEIVED
[/quote]

是自定义消息的action

关于接受消息的API,文档中写的比较清楚,你还可以参考我们的demo
https://docs.jiguang.cn/jpush/client/Android/android_api/#receiver


(Android 唐鹏) #5

就是我写了自定义receiver,在控制台发送自定义消息后,在手机上没有通知


#6

自定义消息是不展示的,这个文档上明确说明了


(Android 唐鹏) #7

想问下,设置别名实在App中的那个设置别名


#8

https://docs.jiguang.cn/jpush/client/Android/android_api/#api_3

在初始化成功后,你需要的地方去设置