android studio 离线打包配置push模块

1.依赖引入
SDK\libs aps-release.aar, aps-unipush-release.aar, gtc.aar, gtsdk-3.2.11.0.aar,

从android studio的sdk中找到对应的包放到HBuilder-Integrate-AS\simpleDemo\libs下面


2.打开build.gradle,在defaultConfig添加manifestPlaceholders节点,如下图所示,将io.dcloud.HBuilder替换成自己的应用包名,将appid等信息替换成申请之后的appid等

javascript 复制代码
android {
    defaultConfig {
        manifestPlaceholders = [
				"GETUI_APPID": "unipush的appid",
                "plus.unipush.appid" : "unipush的appid",
                "plus.unipush.appkey" : "unipush的key",
                "plus.unipush.appsecret": "unipush的secret",
                "apk.applicationId":"io.dcloud.HBuilder"
        ]
    }
}

3.AndroidManifest.xml配置
在io.dcloud.PandoraEntry的Activity标签下追加intent-filter,注意不能和其他的intent-filter内容合并到一起!

javascript 复制代码
<intent-filter>
	<action android:name="android.intent.action.VIEW"/>
	<category android:name="android.intent.category.DEFAULT" />
	<category android:name="android.intent.category.BROWSABLE" />
	<data android:host="io.dcloud.unipush" android:path="/" android:scheme="unipush" />
</intent-filter>

4.dcloud_properties.xml配置
在properties中添加如下配置,features节点与services节点必须同时配置

javascript 复制代码
<properties>
	<features>
		<feature name="Push" value="io.dcloud.feature.aps.APSFeatureImpl">
			<module name="unipush" value="io.dcloud.feature.unipush.GTPushService"/>
		</feature>
	</features>	
	<services>
		<service name="push" value="io.dcloud.feature.aps.APSFeatureImpl"/>
	</services>
</properties>
相关推荐
LinXunFeng10 小时前
拿竞品 App 一扫,技术栈全暴露了
android·flutter·开源
Gracker13 小时前
AIW:从系统机制到性能排查,一本可以对照源码的 Android 电子书
android
三少爷的鞋13 小时前
代码越来越便宜,判断力越来越贵:AI 时代的 Android 架构与协程避坑指南
android
Gracker14 小时前
SmartPerfetto 1.19.0:换过分析引擎之后,这次更新了什么
android
HQL_seven18 小时前
【Android】BroadcastReceiver 详解
android
_祝你今天愉快20 小时前
Paint Cavans高级绘制:[二] Paint-滤镜,XFERMODE
android
小乖写代码20 小时前
字段获取代码(Android) · Android Input Examples
android·whatsapp·账号注册
booboosui20 小时前
停一个活只有杀进程:界面上少了「说点要求」
android
传奇开心果编程1 天前
【Flutter踩坑排雷】第28课:平台目录缺失与修复坑|`flutter create` 的“重建”与“覆盖”边界
android·flutter·ios·移动开发·跨平台·dart·声明式ui
2601_967980111 天前
世界上最好的Python编辑器是什么?我投PyCharm一票
ide·python·pycharm·数据科学·jupyter notebook