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>
相关推荐
fengci.1 小时前
ctfshow其他(web396-web407)
android
JJay.1 小时前
Android 17 大屏适配变化解
android
TE-茶叶蛋2 小时前
结合登录页-PHP基础知识点解析
android·开发语言·php
alexhilton2 小时前
Jetpack Compose元球边缘效果
android·kotlin·android jetpack
y小花3 小时前
安卓音频子系统之USBAlsaManager
android·音视频
KevinCyao4 小时前
安卓android视频短信接口怎么集成?AndroidStudio视频短信开发指南
android
Android出海5 小时前
安卓侧载强制24小时冷却,第三方APK直投买量面临停摆
android·google play·app出海·android出海·android侧载·谷歌开发者·android开发者
kerli5 小时前
Compose 组件:LazyColumn 核心参数与 key/contentType 详解
android·前端
开发者如是说5 小时前
可能是最好用的多语言管理工具
android·前端·后端
流星雨在线5 小时前
[汇总]Android Framework相关
android·framework