(一) 集成资料
3.华为官方QQ群:662059980
(二) V6项目集成步骤和代码说明
1.华为官网申请PUSH服务:
1.1申请
点击申请按钮进行申请
1.2提交应用信息
填写应用信息后提交
1.3生成应用信息
应用信息页面
2.V6代码整合步骤:
2.1 引入华为sdk依赖库
compile 'com.huawei.android.hms:push:2.5.2.300'
2.2 build.gradle中配置maven地址
maven {
url 'http://developer.huawei.com/repo/'
}
2.3 AndroidManifest.xml中增加华为receiver,更换appid
android:name="com.huawei.hms.client.appid"
android:value="10896842" />
android:name="com.huawei.hms.activity.BridgeActivity"
android:configChanges="orientation|locale|screenSize|layoutDirection|fontScale"
android:excludeFromRecents="true"
android:exported="false"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent">
android:name="hwc-theme"
android:value="androidhwext:style/Theme.Emui.Translucent" />
android:name="com.huawei.hms.update.provider.UpdateProvider"
android:authorities="${applicationId}.hms.update.provider"
android:exported="false"
android:grantUriPermissions="true" />
2.4 重写华为PushReceiver
import android.app.NotificationManager;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import com.epoint.GS.frm.CGTTipsManager;
import com.epoint.GS.task.Task_regist