flutter接入推送+小米通道,app前台可正常接收通道,app杀掉进程后无法接收到通知

用户3545911
2022-06-24 05:44 597 1

flutter接入推送,并且配置了小米通道,log里打出来,接入都成功了。但杀掉app进程后,就无法接收到通知。做过以下的尝试:

1、app正常启动后,保持在前台,通过极光后台发送通知,app能正常接收到通知。
2、杀掉app进程,通过极光后台发送通知,app无法接收到通知,通过小米的后台发送通知,手机端能接收到通知。
3、重新打开app后,手机端显示了由极光后台发出的通知。

app的log部分如下:

I/flutter (31577): | JPUSH | Flutter | addEventHandler:
I/flutter (31577): | JPUSH | Flutter | setup:
I/flutter (31577): | JPUSH | Flutter | applyPushAuthority:
I/flutter (31577): _submitDevice
I/| JPUSH | Flutter | Android | (31577): setup
D/| JPUSH | Flutter | Android | (31577): setup :{debug=true, production=true, channel=main, appKey=极光的AppKey}
W/bitenn.cardkin(31577): Accessing hidden field Landroid/app/ActivityThread;->sCurrentActivityThread:Landroid/app/ActivityThread; (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden method Landroid/app/ActivityThread;->getApplication()Landroid/app/Application; (greylist, reflection, allowed)
D/ActionManager(31577): addAction type:JPUSH,action:cn.jpush.android.helper.b
D/JIGUANG-JPush(31577): [JPushInterface] action:init - sdkVersion:4.7.0, buildId:207
D/JIGUANG-JPush(31577): [AndroidUtil] action:checkValidManifest
I/JIGUANG-JPush(31577): [JPushConstants] found messageReceiverClass :com.jiguang.jpush.JPushEventReceiverat com.bitenn.cardking by getCommonReceiverNames
D/JIGUANG-JPush(31577): [AndroidUtil] find authority: com.bitenn.cardking.JAdFileProvider and uri permission is ok
W/bitenn.cardkin(31577): Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden field Landroid/app/ActivityThread;->mActivities:Landroid/util/ArrayMap; (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden field Landroid/app/ActivityThread$ActivityClientRecord;->paused:Z (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden field Landroid/app/ActivityThread$ActivityClientRecord;->activity:Landroid/app/Activity; (greylist, reflection, allowed)
D/JIGUANG-JPush(31577): [ActionHelper] doSingleAction: third_init
D/JIGUANG-JPush(31577): [JPushInterface] setNotificationCallBackEnable
D/| JPUSH | Flutter | Android | (31577): scheduleCache:
I/JIGUANG-D(31577): [JDyAndroidUtils] found userServiceClass :com.jiguang.jpush.JPushCustomService by getCommonServiceNames
I/JIGUANG-D(31577): [JDyAndroidUtils] found userServiceClass :com.jiguang.jpush.JPushCustomService by getCommonServiceNames
I/JIGUANG-JCore(31577): [JCommonServiceHelper] found userServiceClass :com.jiguang.jpush.JPushCustomService by getCommonServiceNames
D/JIGUANG-JPush(31577): [AndroidUtil] action:checkValidManifest
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:start_app,bundle:Bundle[{type=3}]
E/JIGUANG-JOperate(31577): [JOperateProccessHelper] The permission should be defined JO- com.bitenn.cardking.permission.JOPERATE_MESSAGE
E/JIGUANG-JOperate(31577): [JOperateProccessHelper] getReceiverPermission:com.bitenn.cardking.permission.JPUSH_MESSAGE
I/JIGUANG-JCore(31577): [JCoreGobal] action:init jcore,version:3.2.4,build id:160,l:324
D/JIGUANG-JPush(31577): [AndroidUtil] find authority: com.bitenn.cardking.JAdFileProvider and uri permission is ok
I/JIGUANG-JUnionAd(31577): [JUnionCoreBusiness] init, configValid: true
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:notification_state
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:change_foreground
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:init
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:enable_notification_callback
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:get_rid
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:init,bundle:null
D/JIGUANG-JOperate(31577): [JOperateHelper] init
D/JIGUANG-JUnionAd(31577): [InAppHelper] no draw overlay permission
D/JIGUANG-JPush(31577): [AndroidUtil] find authority: com.bitenn.cardking.JAdFileProvider and uri permission is ok
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:install_status
W/JIGUANG-JUnionAd(31577): [InAppHelper] not allowed install apk by system
D/JIGUANG-JUnionAd(31577): [InAppHelper] junion ad is integrated succeed~
D/JIGUANG-JPush(31577): [ChannelHelper] found 不重要 from resource by name:jg_channel_name_p_low
D/JIGUANG-JPush(31577): [ChannelHelper] prepare NotificationChannel, channelId=JPush_2_0
D/JIGUANG-JPush(31577): [ChannelHelper] found 普通 from resource by name:jg_channel_name_p_default
D/JIGUANG-JPush(31577): [ChannelHelper] prepare NotificationChannel, channelId=JPush_3_7
D/JIGUANG-JPush(31577): [XMPushHelper] XIAOMI_APPKEY value:小米的appkey
D/JIGUANG-JPush(31577): [XMPushHelper] XIAOMI_APPID value:2小米的appid
D/JIGUANG-JPush(31577): [XMPushHelper] xiaomiAppKey:小米的appkey,xiaomiAppid:2小米的appid
W/XMPush-31577(31577): [Tid:121994] sdk_version = 4_9_1
W/bitenn.cardkin(31577): Accessing hidden method Lcom/android/id/impl/IdProviderImpl;-><init>()V (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden method Lcom/android/id/impl/IdProviderImpl;->getUDID(Landroid/content/Context;)Ljava/lang/String; (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden method Lcom/android/id/impl/IdProviderImpl;->getOAID(Landroid/content/Context;)Ljava/lang/String; (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden method Lcom/android/id/impl/IdProviderImpl;->getVAID(Landroid/content/Context;)Ljava/lang/String; (greylist, reflection, allowed)
W/bitenn.cardkin(31577): Accessing hidden method Lcom/android/id/impl/IdProviderImpl;->getAAID(Landroid/content/Context;)Ljava/lang/String; (greylist, reflection, allowed)
V/XMPush-31577(31577): [Tid:121994] create id manager is: 1
W/XMPush-31577(31577): [Tid:121999] (Local) begin execute onCommandResult, command=register, resultCode=0, reason=null
D/JIGUANG-JPush(31577): [XMPlatformsReceiver] onCommandResult is called. command={register}, resultCode={0}, reason={null}, category={null}, commandArguments={[打码了]}
V/XMPush-31577(31577): [Tid:122000] get region from system, region = CN
V/XMPush-31577(31577): [Tid:122000] get region from system, region = CN
D/JIGUANG-JPush(31577): [ActionHelper] doAction:third_action
D/JIGUANG-JPush(31577): [XMPlatformsReceiver] xiao mi push register success  <----成功了
V/XMPush-31577(31577): [Tid:121999] ASSEMBLE_PUSH : assemble push register  <----成功了
D/JIGUANG-JPush(31577): [ThirdPushManager] doAction,action:action_register_token,bundle:Bundle[{third_key_action=action_register_token, token=打码了, platform=1}],enable:true
I/JIGUANG-JPush(31577): [ThirdPushManager] uploadRegID regid: 小米的Regid,  <----用这个id,去小米Push的网站后台,是可以向app发送通知的
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:third_push_upload_regid
V/XMPush-31577(31577): [Tid:122000] get region from system, region = CN
I/chatty  (31577): uid=10308(com.bitenn.cardking) Thread-6 identical 1 line
V/XMPush-31577(31577): [Tid:122000] get region from system, region = CN
D/IdProviderImpl(31577): getOAID
V/XMPush-31577(31577): [Tid:121999] receive an intent from server, action=com.xiaomi.mipush.RECEIVE_MESSAGE
V/XMPush-31577(31577): [Tid:121999] receiving an empty message, drop
W/BpBinder(31577): Slow Binder: BpBinder transact took 492 ms, interface=android.app.IActivityManager, code=20 oneway=false
W/XMPush-31577(31577): [Tid:2] [CRcv] receive a msg broadcast: com.xiaomi.mipush.RECEIVE_MESSAGE
V/XMPush-31577(31577): [Tid:121999] receive an intent from server, action=com.xiaomi.mipush.RECEIVE_MESSAGE
V/XMPush-31577(31577): [Tid:121999] processing a message, action=Notification
D/| JPUSH | Flutter | Android | (31577): runMainThread:map = {isEnabled=true},method =onReceiveNotificationAuthorization
D/| JPUSH | Flutter | Android | (31577): runMainThread:map = {isEnabled=true},method =onReceiveNotificationAuthorization
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:jcore_login,bundle:Bundle[mParcelledData.dataSize=88]
D/JIGUANG-JOperate(31577): [JOperateHelper] login
W/Gralloc3(31577): mapper 3.x is not supported
I/flutter (31577): | JPUSH | Flutter | _handleMethod:
I/flutter (31577): flutter onReceiveNotificationAuthorization: {isEnabled: true}
I/flutter (31577): | JPUSH | Flutter | _handleMethod:
I/flutter (31577): flutter onReceiveNotificationAuthorization: {isEnabled: true}
I/flutter (31577): | JPUSH | Flutter | getRegistrationID:
I/| JPUSH | Flutter | Android | (31577): getRegistrationID
D/| JPUSH | Flutter | Android | (31577): getRegistrationID: 
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:get_rid
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:activity_lifecycle,bundle:Bundle[{lifecycle_name=onActivityPaused, activity_hash=263558980, activity_name=com.bitenn.cardking.MainActivity, activity_intent=Intent { act=android.intent.action.RUN flg=0x30000000 cmp=com.bitenn.cardking/.MainActivity (has extras) }}]
D/JIGUANG-JCore(31577): [JCoreHelper] runActionWithService action:change_foreground
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:exit_app,bundle:null
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:activity_lifecycle,bundle:Bundle[{lifecycle_name=onActivityStopped, activity_hash=263558980, activity_name=com.bitenn.cardking.MainActivity, activity_intent=Intent { act=android.intent.action.RUN flg=0x30000000 cmp=com.bitenn.cardking/.MainActivity (has extras) }}]
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:activity_lifecycle,bundle:Bundle[{lifecycle_name=onActivitySaveInstanceState, activity_hash=263558980, activity_name=com.bitenn.cardking.MainActivity, activity_intent=Intent { act=android.intent.action.RUN flg=0x30000000 cmp=com.bitenn.cardking/.MainActivity (has extras) }}]
D/JIGUANG-JOperate(31577): [JOperateEventDispatch] onEvent:activity_lifecycle,bundle:Bundle[{lifecycle_name=onActivityDestroyed, activity_hash=263558980, activity_name=com.bitenn.cardking.MainActivity, activity_intent=Intent { act=android.intent.action.RUN flg=0x30000000 cmp=com.bitenn.cardking/.MainActivity (has extras) }}]
W/bitenn.cardkin(31577): Accessing hidden method Lmiui/contentcatcher/sdk/ContentCatcherManager;->unregisterContentInjector(Lmiui/contentcatcher/sdk/Token;)V (greylist, linking, allowed)
Lost connection to device.

1个回答

热门排序
  • 小米厂商集成成功获取token后,需要在关注下配额问题厂商没有配额,极光这边也无法走小米通道,有客户遇到过,您可以直接查询小米厂商的配额,一般一到两天会更新,如没有更新,可进一步咨询小米给您尽快分配,配额查询接口 https://dev.m 展示全部