你好,我按照步骤集成了小米厂商推送,却收不到推送
集成步骤如下:使用mavenCentral 自动化集成步骤
1.配置
implementation 'cn.jiguang.sdk:jcore:2.9.0'
implementation 'cn.jiguang.sdk:jpush:4.2.0'
implementation 'cn.jiguang.sdk.plugin:xiaomi:4.2.0'//版本号和对应的JPush版本号相同
2.配置
manifestPlaceholders = [
JPUSH_PKGNAME : "com.xxx.xxx",
JPUSH_APPKEY : "xxx", //JPush上注册的包名对应的appkey.
JPUSH_CHANNEL : "kiddo", //暂时填写默认值即可.
XIAOMI_APPKEY : "MI-xxx", // 小米平台注册的appkey,注意不要将前缀去掉 MI-appkey
XIAOMI_APPID : "MI-xxx", // 小米平台注册的appid,注意不要将前缀去掉 MI-appid
]
3.加入代码
<receiver
android:name="cn.jpush.android.service.PushReceiver"
tools:node="replace"
android:enabled="true">
<intent-filter android:priority="1000">
<action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" />
<!--Required 显示通知栏 -->
<category android:name="${applicationId}" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<!-- Optional -->
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
配置完成,无法收到推送
在厂商设置那里也配置