android 打包后推送消息能收到,但是点击推送消息后相应的后续操作无法执行

android
jpush
标签: #<Tag:0x00007fb83c15faa8> #<Tag:0x00007fb83c15f968>

(Kirk Wang) #18

扫码下载 apk 安装测试 demo 是可以打开的,这个是正式的版本吗


(Kirk Wang) #19

收到推送打不开是用API发送的,我在激光后台推只用web推,刚刚在demo推是用的web,APi没有设置根据registerID推


#20

你们 debug 版本到 正式版本,做了哪些操作?区别有哪些?

你在 web 推送给正式版本的自己的项目是否正常呢?

你们给正式版本推送的时候,有没有设置点击跳转所需要的 extra 参数呢?


(Kirk Wang) #21

点击后可以有其它操作的自定义消息吧?
我发普通通知是能收到的,但是发自定义消息是"code":102,“data”:{“id”:241,“type”:1}
打印的LOG:
06-25 16:01:54.120 29441-29441/com.jisu.sports D/JPushReceiver: onReceive - cn.jpush.android.intent.MESSAGE_RECEIVED
接受到推送下来的自定义消息
title : null
message : null
extras :


(Kirk Wang) #22

debug版本只是 用android studio 生成了一个正式包而已,没做其它操作


#23

自定义消息是接收不展示的,点击后是走 notification 的 open 方法获取到 notification 的信息。

点击跳转的处理参考


(Kirk Wang) #24

我们现在功能需求是展示+跳转

debug LOG:
06-25 16:22:44.202 3736-3736/com.jisu.sports D/JPushReceiver: onReceive - cn.jpush.android.intent.NOTIFICATION_RECEIVED
    接受到推送下来的通知
     title : 极速体育
06-25 16:22:44.203 3736-3736/com.jisu.sports D/JPushReceiver: message : 2018NBA探花卢卡-东契奇欧冠联赛十佳球集锦!
    extras : {"code":102,"data":{"id":241,"type":1}}
06-25 16:22:51.076 3736-3736/com.jisu.sports D/JPushReceiver: onReceive - cn.jpush.android.intent.NOTIFICATION_OPENED
    用户点击打开了通知
06-25 16:22:51.081 3736-3736/com.jisu.sports D/JPushReceiver: data : PushNewVideoEntity(code=102, data=Data(type=1, id=241))

(Kirk Wang) #25

build release后的apk安装就只有通知展示,点击没有跳转到我指定的页面


(Kirk Wang) #26

极光后台能发送 通知+点击跳转的通知吗


(Kirk Wang) #27

release包LOG:

06-25 16:31:53.915 5950-5950/? E/scan2: MSG_SCAN_WIFI
06-25 16:32:00.013 2566-2566/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.TIME_TICK
06-25 16:32:00.004 747-747/? W/memtrack@1.0-se: type=1400 audit(0.0:46029): avc: denied { search } for name="proc" dev="debugfs" ino=10231 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=dir permissive=0
06-25 16:32:00.013 2566-2566/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.TIME_TICK
06-25 16:32:00.023 2566-2566/? D/KeyguardUpdateMonitor: handleTimeUpdate
06-25 16:32:00.064 747-747/? W/memtrack@1.0-se: type=1400 audit(0.0:46031): avc: denied { search } for name="proc" dev="debugfs" ino=10231 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=dir permissive=0
06-25 16:32:00.274 747-747/? I/chatty: uid=1000(system) memtrack@1.0-se identical 20 lines
06-25 16:32:00.274 747-747/? W/memtrack@1.0-se: type=1400 audit(0.0:46052): avc: denied { search } for name="proc" dev="debugfs" ino=10231 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=dir permissive=0
06-25 16:32:00.297 6196-6388/? D/JIGUANG-JPush: [JPushDataAction] response:[MessagePush] - msgType:0, msgId:2561959733, msgContent:com.jisu.sports
    895e81499efc24ca558d29e0
    {"ad_id":"2561959733","m_content":{"ad_t":0,"n_alert_type":1,"n_content":"2018NBA探花卢卡-东契奇欧冠联赛十佳球集锦!","n_extras":{"code":102,"data":{"id":241,"type":1}},"n_flag":1,"n_priority":1,"n_style":1},"n_builder_id":0,"n_only":1,"show_type":4} - JResponse{code=0}
06-25 16:32:00.319 6196-6388/? D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:340, connection:913, pkg:com.jisu.sports
    [NetworkingClient] Network listening...
06-25 16:32:00.331 6196-6613/? D/JIGUANG-JPush: [NotificationHelper] running flag:false
06-25 16:32:00.344 2566-2566/? D/StatusBar: addNotification key=0|com.jisu.sports|191037971|null|10392
06-25 16:32:00.355 6196-6613/? D/JIGUANG-JPush: [NotificationHelper] Send push received broadcast to developer defined receiver
06-25 16:32:00.384 747-747/? I/chatty: uid=1000(system) memtrack@1.0-se expire 4 lines
06-25 16:32:00.384 747-747/? W/memtrack@1.0-se: type=1400 audit(0.0:46066): avc: denied { search } for name="proc" dev="debugfs" ino=10231 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=dir permissive=0
06-25 16:32:00.407 1586-2609/? W/ActivityManager: Sending non-protected broadcast android.intent.action.APPLICATION_MESSAGE_UPDATE from system 2566:com.android.systemui/1000 pkg com.android.systemui. Callers=
    Sending non-protected broadcast android.intent.action.APPLICATION_MESSAGE_UPDATE from system 2566:com.android.systemui/1000 pkg com.android.systemui. Callers=
06-25 16:32:00.409 3454-3454/? I/Launcher.ApplicationsMessage: onReceive true
    update com.jisu.sports/ to 1
06-25 16:32:02.860 6196-6392/? D/JIGUANG-JCore: [HttpHelper] status code:200 retry left:2
06-25 16:32:02.904 747-747/? I/chatty: uid=1000(system) memtrack@1.0-se expire 4 lines
06-25 16:32:02.904 747-747/? W/memtrack@1.0-se: type=1400 audit(0.0:46086): avc: denied { search } for name="proc" dev="debugfs" ino=10231 scontext=u:r:hal_memtrack_default:s0 tcontext=u:object_r:qti_debugfs:s0 tclass=dir permissive=0
06-25 16:32:02.956 6196-6392/? D/JIGUANG-JCore: [HttpHelper] status code:200 retry left:2
06-25 16:32:03.041 6196-6392/? I/chatty: uid=10392(u0_a392) pool-1-thread-1 identical 1 line
06-25 16:32:03.145 6196-6392/? D/JIGUANG-JCore: [HttpHelper] status code:200 retry left:2
06-25 16:32:03.929 5950-5950/? E/scan2: MSG_SCAN_WIFI
06-25 16:32:04.374 4731-13568/? I/PowerCenterProvider: call METHOD_GET_POWER_SUPPLY_INFO, quick_charge:false
06-25 16:32:04.374 4731-4969/? I/PowerCenterProvider: call METHOD_GET_POWER_SUPPLY_INFO, quick_charge:false
06-25 16:32:04.374 4731-4742/? I/PowerCenterProvider: call METHOD_GET_POWER_SUPPLY_INFO, quick_charge:false
06-25 16:32:04.466 924-1093/? I/ThermalEngine: handle_thresh_sig: HIS Id HISTORY-MODEM-PA1 Sensor pa_therm1 Temp 30000
点击后的LOG:
06-25 16:32:44.590 2566-2844/? D/SystemUI.DriveMode: drive mode handleUpdateState
06-25 16:32:47.273 2566-2566/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
06-25 16:32:47.274 2566-2566/? D/KeyguardUpdateMonitor: handleBatteryUpdate
06-25 16:32:47.278 2521-3085/? D/HeadsetStateMachine: Disconnected process message: 10, size: 0
06-25 16:32:47.279 2521-3085/? D/HeadsetStateMachine: Enter processIntentBatteryChanged()
    Exit processIntentBatteryChanged()
    Exit Disconnected processMessage() 
06-25 16:32:47.281 4731-4731/? I/BatteryInfoReceiver: ACTION_BATTERY_CHANGED
06-25 16:32:47.281 2742-2742/? D/QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0
06-25 16:32:47.281 3931-4358/? D/PowerCheckerService: onBatteryChanged, mBatteryLevel = 100, status = 2, level = 100, plug = 2
06-25 16:32:47.612 2566-6647/? D/FreeformWindow: isLaunchMultiWindow:false gameKey:0
06-25 16:32:47.614 1586-3430/? D/systemui_boost: notification panel visible=false
    ui thread tid=2566
    render thread tid=2892
    thread tid=2566, priority is set to -10
    thread tid=2892, priority is set to -10
    ui thread and render thread are reset
06-25 16:32:47.617 6165-6165/? D/JIGUANG-JCore: [PushReceiver] onReceive - cn.jpush.android.intent.NOTIFICATION_OPENED_PROXY.d4ea8c44-ec47-4605-91d7-22389c5e64ce
06-25 16:32:47.620 6165-6648/? D/JIGUANG-JPush: [PushReceiverCore] onReceive - cn.jpush.android.intent.NOTIFICATION_OPENED_PROXY.d4ea8c44-ec47-4605-91d7-22389c5e64ce
06-25 16:32:47.633 2566-2566/? D/StatusBar: removeNotification key=0|com.jisu.sports|191037971|null|10392 old=StatusBarNotification(pkg=com.jisu.sports user=UserHandle{0} id=191037971 tag=null key=0|com.jisu.sports|191037971|null|10392: Notification(channel=JPush pri=1 contentView=null vibrate=null sound=default tick defaults=0x1 flags=0x11 color=0x00000000 vis=PRIVATE))
06-25 16:32:47.634 1586-3420/? W/ActivityManager: Sending non-protected broadcast android.intent.action.APPLICATION_MESSAGE_UPDATE from system 2566:com.android.systemui/1000 pkg com.android.systemui. Callers=
    Sending non-protected broadcast android.intent.action.APPLICATION_MESSAGE_UPDATE from system 2566:com.android.systemui/1000 pkg com.android.systemui. Callers=
06-25 16:32:47.635 3454-3454/? I/Launcher.ApplicationsMessage: onReceive true
    update com.jisu.sports/ to null
06-25 16:32:47.706 2566-2566/? D/KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
06-25 16:32:47.706 2521-3085/? D/HeadsetStateMachine: Disconnected process message: 10, size: 0
    Enter processIntentBatteryChanged()
    Exit processIntentBatteryChanged()
    Exit Disconnected processMessage() 
06-25 16:32:47.707 2566-2566/? D/KeyguardUpdateMonitor: handleBatteryUpdate
06-25 16:32:47.707 2742-2742/? D/QtiCarrierConfigHelper: WARNING, no carrier configs on phone Id: 0
06-25 16:32:47.707 4731-4731/? I/BatteryInfoReceiver: ACTION_BATTERY_CHANGED
06-25 16:32:47.708 3931-4358/? D/PowerCheckerService: onBatteryChanged, mBatteryLevel = 100, status = 2, level = 100, plug = 2

(Kirk Wang) #28

打包就多了一部混淆代码嘛,我也加过了,混淆没加的话 应该通知都收不到的吧,下面是混淆的代码,和文档是一样的啊

-dontoptimize
-dontpreverify

-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
-keep class * extends cn.jpush.android.helpers.JPushMessageReceiver { *; }

-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }

(Kirk Wang) #29

好像跟混淆有关,我把minifyEnabled设置为false后 点击就能跳转了


(Kirk Wang) #30

但是项目肯定是要混淆的吧,这个问题,你们看看有什么好的解决方案吗?尽快给我答复下,项目已上线,很急,麻烦了!!!


#31

研发正在分析中,请稍候


(Kirk Wang) #32

或者说有没有老版本比较稳定的,我降级试一试


#33

替换一下这个jar,jpush-android-3.1.3.jar (187.9 KB)
复现一下你的情况,然后贴一下 log


(Kirk Wang) #34

你给我发的jar,拿不到registerID,下面这段代码返回是null:
JPushInterface.getRegistrationID(this)


#35

只用这个 jar 替换你的 3.1.3 的jar,其他的jar 和 so 保持原样。

取不到 registrationID 看一下客户端日志


(Kirk Wang) #36
    //极光推送
//    implementation 'cn.jiguang.sdk:jpush:3.1.3'
    implementation 'cn.jiguang.sdk:jcore:1.2.1'
是把cn.jiguang.sdk:jpush:3.1.3换掉了,我是用的jcenter 自动集成
  日志:
06-26 10:13:37.734 762-874/? E/ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/scsi_host/host0/../../../clkscale_enable with 1
     return value 2
06-26 10:13:38.190 735-735/? I/vendor.qti.bluetooth@1.0-ibs_handler: SerialClockVote: vote for UART CLK ON
06-26 10:13:38.195 735-735/? D/vendor.qti.bluetooth@1.0-wake_lock: Acquire wakelock is acquired 
06-26 10:13:38.195 735-735/? I/vendor.qti.bluetooth@1.0-ibs_handler: DeviceWakeUp: Writing IBS_WAKE_IND
06-26 10:13:38.199 735-3047/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_WAKE_ACK: 0xFC
06-26 10:13:38.201 735-3047/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_WAKE_IND: 0xFD
    ProcessIbsCmd: Writing IBS_WAKE_ACK
06-26 10:13:38.257 735-3047/? I/vendor.qti.bluetooth@1.0-ibs_handler: ProcessIbsCmd: Received IBS_SLEEP_IND: 0xFE
    
    --------- beginning of system
06-26 10:13:38.621 12358-12358/com.jisu.sports I/Timeline: Timeline: Activity_launch_request time:94696961
06-26 10:13:38.624 1586-23423/? I/ActivityManager: START u0 {cmp=com.jisu.sports/.ui.MainNavigationActivity} from uid 10399
06-26 10:13:38.634 1586-23423/? D/ActivityTrigger: activityStartTrigger: Activity is Triggerred in full screen ApplicationInfo{52dcfbd com.jisu.sports}
06-26 10:13:38.634 1586-23423/? E/ActivityTrigger: activityStartTrigger: not whiteListedcom.jisu.sports/com.jisu.sports.ui.MainNavigationActivity/2
06-26 10:13:38.635 1586-23423/? D/ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{52dcfbd com.jisu.sports} is now in focus and seems to be in full-screen mode
06-26 10:13:38.635 1586-23423/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.jisu.sports/com.jisu.sports.ui.MainNavigationActivity/2
06-26 10:13:38.635 1586-23423/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger 
06-26 10:13:38.663 12358-12358/com.jisu.sports D/JIGUANG-JCore: [ServiceHelper] We found the appKey is changed or register appkey is empty. Will re-register.
06-26 10:13:38.664 12358-12358/com.jisu.sports E/JIGUANG-JCore: [JCoreGlobal] errorcode:10001,metadata: JCore appKey - not defined in manifest
06-26 10:13:38.667 12358-12358/com.jisu.sports W/JIGUANG-JCore: [JCoreInterface] JCore init failed
06-26 10:13:38.673 12358-12358/com.jisu.sports D/CrashReport: >>> com.jisu.sports.ui.LaunchActivity onPaused <<<
06-26 10:13:38.674 12358-12358/com.jisu.sports I/CrashReport-Native: Set native info: isAppForeground(false)
06-26 10:13:38.675 1586-23423/? D/ActivityTrigger: activityResumeTrigger: The activity in ApplicationInfo{52dcfbd com.jisu.sports} is now in focus and seems to be in full-screen mode
06-26 10:13:38.675 1586-23423/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.jisu.sports/com.jisu.sports.ui.MainNavigationActivity/2
06-26 10:13:38.678 1586-23423/? I/Timeline: Timeline: App_transition_ready time:94697018
06-26 10:13:38.679 3334-3521/? I/WtProcessController: MOVE TO FOREGROUND: com.jisu.sports 10399
    FOREGROUND INFO: name=com.jisu.sports uid=10399 pid=12358 TaskId:6940
06-26 10:13:38.691 12358-12358/com.jisu.sports D/CrashReport: >>> com.jisu.sports.ui.MainNavigationActivity onCreated <<<
06-26 10:13:38.705 568-568/? E/SELinux: avc:  denied  { find } for service=miui.contentcatcher.ContentCatcherService pid=12358 uid=10399 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_app_service:s0 tclass=service_manager
06-26 10:13:38.705 12358-12478/com.jisu.sports E/ContentCatcherManager: failed to get ContentCatcherService.
06-26 10:13:38.705 568-568/? E/SELinux: avc:  denied  { find } for service=miui.contentcatcher.ContentCatcherService pid=12358 uid=10399 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_app_service:s0 tclass=service_manager
06-26 10:13:38.836 12358-12358/com.jisu.sports D/CrashReport: >>> com.jisu.sports.ui.MainNavigationActivity onResumed <<<
06-26 10:13:38.838 12358-12358/com.jisu.sports I/CrashReport-Native: Set native info: isAppForeground(true)
06-26 10:13:38.839 12358-12394/com.jisu.sports I/MobclickAgent: onResume called before onPause
06-26 10:13:38.844 12358-12394/com.jisu.sports I/MobclickAgent: Extend current session: BF3BA1504AD098A73109DDDF9BB91024
06-26 10:13:38.848 12358-12394/com.jisu.sports D/MobclickAgent: Report policy : ReportAtLaunch
06-26 10:13:38.848 12358-12394/com.jisu.sports D/UMLog: 当前发送策略为:启动时发送。详见链接 https://developer.umeng.com/docs/66632/detail/66976?um_channel=sdk
06-26 10:13:38.889 12358-12469/com.jisu.sports W/Settings: Setting android_id has moved from android.provider.Settings.System to android.provider.Settings.Secure, returning read-only value.

#37

看 log 是 Appkey 没有传。
换成手动集成吧,换手动集成,然后替换我这个 jar,然后复现你的这个情况,将 log 提供一下,我们来分析一下