A new Flutter project.
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android.
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
该插件支持oppo、vivo、honour、xiaomi推送 先在只是把推送注册完成之后的regId(token)回调回来了,其它的功能未做*
repositories {
maven { url 'https://developer.hihonor.com/repo/' }
maven { url 'https://raw.githubusercontent.com/ggvle/pushLib/tree/main/'}
}
repositories {
maven { url 'https://developer.hihonor.com/repo/' }
maven { url 'https://raw.githubusercontent.com/ggvle/pushLib/tree/main/'}
}
///vivo官网申请的appkey appid 荣耀官网申请的appid
manifestPlaceholders += [
VIVO_APPKEY : "9c29fe5f-ea67-46d3-951f-81da78d2c029",
VIVO_APPID : "10000",
//
HONOUR_APPID: "11111111",
]
-keep public class * extends android.app.Service
-keep class com.heytap.msp.** { *;}
-dontwarn com.vivo.push.**
-keep class com.vivo.push.**{*; }
-keep class com.vivo.vms.**{*; }
-keep class com.official_push.official_push_pulgin.vivo.VivoPushMessageReceiverImpl{*;}
-keep class com.official_push.official_push_pulgin.xiaomi.XiaomiMessageReceiver{*;}
///oppo官网推送平台申请的appSecret、appKey以及needLog是否需要开启推送相关日志
PushManager.initOppoPush(appSecret: "sK8dkfTwHt11QezBuIO4kjJV", appKey: "67ZtaSY1EyjZZoYqqYVT6e3X",needLog: true);
///小米官网推送平台申请的appId、appKey、enableLog是否开启日志可选,默认不开
PushManager.initXiaomiPush(appId: "1000270", appKey: "670100056270",enableLog:true);
///enableLog是否开启日志可选,默认不开
PushManager.initVivoPush(enableLog:true);
///initToken 是否初始化注册成功后返回推送regId ,enableLog是否开启日志可选,默认不开
PushManager.initHonourPush(initToken: true,enableLog:true);
///返回的model包含推送类型(type)、推送regId(regId)、推送信息json字符串(pushReceiverFunJsonStr) 注意都可为null
PushListener(
PushManager.channel,
listener: (PushModel? model) {
},
);
///参数为推送类型 其中小米、vivo会直接返回,oppo、honour回调中获取到
await PushManager.getRegId(PushType.xiaomi);
///参数为推送类型 其中小米、vivo会直接返回,oppo、honour回调中获取到
await PushManager.unRegister(context);