使用信鸽推送,每每会出现注册失败的状况,下面记录下我总结的几种状况。android
1.MessageReceiver没有写,因为官方文档上缺这行代码,不少人集成的时候会没写这个。建议参照官方Demo。
2.XGRemoteService没有修改成当前包名。
3.若是使用的AndroidStudio,看一下AndroidStudio中的applicationId是否与包名相同。不一样也会到致失败。
4.`<activitysegmentfault
android:name="com.tencent.android.tpush.XGPushActivity" android:exported="false" android:theme="@android:style/Theme.Translucent"> <intent-filter> <!-- 若使用AndroidStudio,请设置android:name="android.intent.icon_notice" --> <action android:name="android.intent.action" /> </intent-filter> </activity>`
若是使用AndroidStudio这里必定要改
5.最重要的固然仍是ACCESS_ID,ACCESS_KEY,这个必定要正确。前面几点都是在这个正确的基础上的。app