{"repo":"GetuiLaboratory/getui-flutter-plugin","free":true,"listed":false,"github":"https://github.com/GetuiLaboratory/getui-flutter-plugin","clone":"git clone https://github.com/GetuiLaboratory/getui-flutter-plugin.git","description":"个推官方提供的推送SDK Flutter 插件（支持 Android & iOS）","language":"Dart","stars":153,"topics":["flutter","getui","android","ios"],"license":"MIT","category":"mobile-apps","readme_excerpt":"Getui Flutter Plugin 集成与使用指南 1. 引入插件 在 pubspec.yaml 中添加以下依赖： 执行以下命令下载依赖并运行项目： 或者直接通过命令行添加： 2. 配置 2.1 Android 配置 参考个推官网文档进行配置。 核心PushService、GTIntentService已经内置在flutter插件中 配置 Maven 库地址 在项目根目录 build.gradle 文件中添加： 添加依赖 在 android/app/build.gradle 文件中配置： 2.2 iOS 配置 在 main.dart 中添加以下代码以启动 SDK： 启用通知 在 Xcode 中，进入 Signing & Capabilities ，添加 Push Notifications 。 Notification Service Extension 为精确统计消息送达率，可添加 Notification Service Extension ，并在 Extensions 中调用 GTExtensionSDK 的统计接口。具体参考个推 iOS 集成文档。 2.3 HarmonyOS 配置 引入插件, 见上文 使用鸿蒙定制版 Flutter，否则报错依赖缺失, 下载地址: OpenHarmony Flutter 及 使用教程。 启动应用教程 2.3.1 配置 build-profile.json5 ohos工程需要兼容字节码包,在项目级build-profile.json5: 2.3.2 配置 module.json5 在项目中配置： 2.3.3 注册插件 运行 fvm flutter build hap 后自动生成 GeneratedPluginRegistrant 2.3.4 配置在线通知点击事件 通过个推在线渠道展示的通知类消息，待通知点击打开目的页面后，由客户必须调用PushManager.setClickWant(want)完善报表和完成后续业务，以免影响消息业务使用（重要） 通知点击打开应用页面（目的页面由下发通知时决定） 通知点击打开浏览器 配置参考demo代码: EntryAbility.ets 2.3.5 其他API功能 参考: 官网文档 3. 使用方法 3.1 公共 API 导入插件： 初始化 SDK (Android/ohos) 设置角标 绑定/解绑别名 sn: 绑定序列码,不为nil 设置/查询标签 sn: 绑定序列码,不为nil 开启/关闭推送服务（iOS 不支持） 获取版本和 CID 设置静默时间(IOS不支持) 开始时间，beginHour = 0 && beginHour 0 && duration 2.4.6.0：使用最新插件版本 UIScene 配置 在 SceneDelegate.m 中需要将启动参数传递给flutter插件，[GetuiflutPlugin handleSceneWillConnectWithOptions:connectionOptions];","default_branch":null,"files":null,"tree":[],"storefront":"/r/GetuiLaboratory","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/GetuiLaboratory/getui-flutter-plugin/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}