honor_push 0.0.1 copy "honor_push: ^0.0.1" to clipboard
honor_push: ^0.0.1 copied to clipboard

PlatformAndroid

Lightweight Flutter plugin for honor push integration. Simplifies push notifications on honor devices, supporting token registration, message receiving, and callback handling.

honor_push #

Pub support

honor 推送API (honor push)

一个轻量级 Flutter 插件,用于集成 honor 推送 API。它简化了 honor 手机平台的推送通知开发,支持 token 注册、消息接收和回调处理。

Usage #

  • 在Android/build.gradle.kts添加:

    buildscript {
      repositories {
          google()
          mavenCentral()
          maven {
              url = uri("https://developer.hihonor.com/repo")
          }
      }
    
      dependencies {
          classpath("com.android.tools.build:gradle:8.7.3")
          classpath("com.hihonor.mcs:asplugin:2.0.1.300")
      }
    }
    
  • 在Android/app/build.gradle.kts添加:

      plugins {
        ...
        id("com.hihonor.mcs.asplugin")
      }
    
  • 从荣耀后台下载mcs-services.json,放置于android/app 目录下

  • 在pubspec.yaml添加:

    honor_push:
      app_id: 'your app id'
    
  • 业务逻辑

    import 'package:honor_push/honor_push.dart';

    final honorPushPlugin = HonorPush();
    await honorPushPlugin.initialize();
    final resp = await honorPushPlugin.getToken();
    final regId = resp.token;

example

Additional information #

具体参考:honor客户端API接口文档

0
likes
160
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

Lightweight Flutter plugin for honor push integration. Simplifies push notifications on honor devices, supporting token registration, message receiving, and callback handling.

Homepage
Repository (GitHub)
View/report issues

Topics

#honorpush

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on honor_push

Packages that implement honor_push