lam
lam
  • 发布:2017-08-28 17:42
  • 更新:2019-10-14 14:44
  • 阅读:2023

android 离线打包,个推配置无法接收消息

分类:5+ SDK

不知是否还有哪里没配置正确的
AndroidManifest.xml 配置如下:
<meta-data android:name="PUSH_APPID" android:value="vYz0W8Cvak5wH4ivoUl8K7"/>
<meta-data android:name="PUSH_APPKEY" android:value="eVWpLxmzQC7GbaiBj0zYc"/>
<meta-data android:name="PUSH_APPSECRET" android:value="34tTJWl0iW8F35KHSRlI88"/>
<service
android:name="com.igexin.sdk.PushService"
android:exported="true"
android:label="NotificationCenter"
android:process=":pushservice">
<intent-filter>
<action android:name="com.igexin.sdk.action.service.message"/>
</intent-filter>
</service>
<receiver android:name="com.igexin.sdk.PushReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
<action android:name="android.intent.action.USER_PRESENT"/>
<action android:name="com.igexin.sdk.action.refreshls"/>
<action android:name="android.intent.action.MEDIA_MOUNTED"/>
<action android:name="android.intent.action.ACTION_POWER_CONNECTED"/>
<action android:name="android.intent.action.ACTION_POWER_DISCONNECTED"/>
</intent-filter>
</receiver>
<activity
android:name="com.igexin.sdk.PushActivity"
android:excludeFromRecents="true"
android:exported="false"
android:process=":pushservice"
android:taskAffinity="com.igexin.sdk.PushActivityTask"
android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
<activity
android:name="com.igexin.sdk.GActivity"
android:excludeFromRecents="true"
android:exported="true"
android:process=":pushservice"
android:taskAffinity="com.igexin.sdk.PushActivityTask"
android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
<service
android:name="com.igexin.download.DownloadService"
android:process=":pushservice"/>
<receiver android:name="com.igexin.download.DownloadReceiver">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
<provider
android:name="com.igexin.download.DownloadProvider"
android:authorities="downloads.io.dcloud.Hello"
android:exported="true"
android:process=":pushservice"/>
<receiver android:name="io.dcloud.feature.apsGt.GTNotificationReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="io.dcloud.Hello.CREATE_NOTIFICATION"/>
<action android:name="io.dcloud.Hello.__REMOVE_NOTIFICATION"/>
<action android:name="io.dcloud.Hello.
CLEAR_NOTIFICATION"/>
<action android:name="io.dcloud.Hello.__CLILK_NOTIFICATION"/>
</intent-filter>
</receiver>
<service
android:name="io.dcloud.feature.apsGt.GTNormalIntentService"/>
<service
android:name="io.dcloud.feature.apsGt.GTNormalPushService"
android:exported="true"
android:label="PushService"
android:process=":pushservice">
</service>

权限配置
<!-- Push(推送)-个推 begin -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="getui.permission.GetuiService.io.dcloud.Hello" />

<permission  
    android:name="getui.permission.GetuiService.io.dcloud.Hello"  
    android:protectionLevel="normal" />  
<!-- Push(推送)-个推    end -->
2017-08-28 17:42 负责人:无 分享
已邀请:
骁骑

骁骑

<action android:name="io.dcloud.Hello.CREATE_NOTIFICATION"/>
<action android:name="io.dcloud.Hello.__REMOVE_NOTIFICATION"/>
<action android:name="io.dcloud.Hello.
CLEAR_NOTIFICATION"/>
<action android:name="io.dcloud.Hello.__CLILK_NOTIFICATION"/>

这几个地方要改成 "你的包名+.__XXXXXXX"

还有在application节点上边有一个申请权限的地方也需要填写你的包名
具体参考文档
http://ask.dcloud.net.cn/docs/#//ask.dcloud.net.cn/article/227

  • lam (作者)

    io.dcloud.Hello这个就是我的包名丫

    2017-08-29 10:41

  • lam (作者)

    权限上面不是也加上了吗。应用包名package="io.dcloud.Hello"

    2017-08-29 10:45

  • 骁骑

    用plus.push.getCilentInfo获取下clientid看下能获取到不

    2017-08-29 10:50

lam

lam (作者)

已经解决,把小米推送的配置去掉就行了。

小明子

小明子

io.dcloud.feature.apsGt.GTNormalPushService 为什么我的这个类找不到????

  • i***@163.com

    解决了吗。我也找不到这个类

    2021-08-19 09:28

该问题目前已经被锁定, 无法添加新回复