应用研发平台EMAS目前配置了这个值,app端退出进程不会弹窗,都有啥原因呢?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
应用研发平台EMAS在配置了相关参数后,如果App端退出进程仍然无法弹窗,可能的原因包括以下几个方面。以下是详细分析和排查步骤:
token
。onRegister regid=****
或XiaoMi register success
。MPS:OPush
,确认日志中包含onRegister regid=****
。MPS:vPush
,确认日志中包含getRegId regId:****
。MasterSecret
、AppKey
等)无误。storeOffLine
参数必须设置为true
。title
)长度小于16字符。body
)长度小于128字符。AndroidXiaoMiActivity
,以启动小米托管弹窗功能。NotificationChannel
进行管理。如果未正确创建或配置通知通道,通知将被系统静默,不会弹出。channelId
与推送时使用的AndroidNotificationChannel
参数一致。if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
String channelId = "vibration_sound"; // 通知通道ID
CharSequence name = "我的测试通道";
String description = "我的测试通道描述";
int importance = NotificationManager.IMPORTANCE_HIGH;
NotificationChannel mChannel = new NotificationChannel(channelId, name, importance);
mChannel.setDescription(description);
mNotificationManager.createNotificationChannel(mChannel);
}
AndroidNotificationChannel
参数值与App端创建的channelId
一致。iOSApnsEnv
参数,注意参数名区分大小写。Token
,例如:
reportThirdPushToken
。token from register
。Token
,请检查设备网络连接或重新初始化推送服务。Application
的onCreate
方法中判断是否是主进程时,需确保推送SDK的初始化逻辑未被跳过。if (isMainProcess()) {
// 初始化推送SDK
CloudPushService pushService = PushServiceFactory.getCloudPushService();
pushService.register(applicationContext, new CommonCallback() {...});
}
DEBUG
:
CloudPushService pushService = PushServiceFactory.getCloudPushService();
pushService.setLogLevel(CloudPushService.LOG_DEBUG);
以上原因涵盖了推送通道注册、托管弹窗配置、通知通道设置、推送模式、设备权限及初始化等多个方面。建议按照上述步骤逐一排查,定位具体问题并解决。