Skip to main content

bxpush_mi 0.0.4 copy "bxpush_mi: ^0.0.4" to clipboard
bxpush_mi: ^0.0.4 copied to clipboard

PlatformAndroid

bxpush_mi sdk for flutter.

mipush #

Flutter plugin for Xiaomi MiPush (Android), adapted from the official C SDK demo.

Supported Platform #

  • Android

Android Setup #

The plugin already bundles the MiPush AAR from:

  • MiPush_Client_C_Android_20260129/SDK/MiPush_SDK_Client_7_9_2-C_3rd.aar

For your app module, make sure notification permission is handled for Android 13+.

Usage #

import 'package:mipush/mipush.dart';

final mipush = Mipush();

await mipush.registerPush(appId: 'YOUR_APP_ID', appKey: 'YOUR_APP_KEY');
final regId = await mipush.getRegId();

mipush.events().listen((event) {
	// event["event"]: passThrough / notificationClicked /
	// notificationArrived / commandResult / registerResult
	print(event);
});

API #

  • registerPush({required String appId, required String appKey})
  • unregisterPush()
  • setAlias(String alias, {String? category})
  • unsetAlias(String alias, {String? category})
  • setUserAccount(String account, {String? category})
  • unsetUserAccount(String account, {String? category})
  • subscribe(String topic, {String? category})
  • unsubscribe(String topic, {String? category})
  • setAcceptTime(...)
  • pausePush()
  • resumePush()
  • getRegId()
  • events()

Event Payload #

All events are Map<String, dynamic> and contain event key.

  • Message callbacks include fields like content, topic, alias, title, description, extra.
  • Command callbacks include fields like command, resultCode, reason, commandArguments.
0
likes
125
points
82
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

bxpush_mi sdk for flutter.

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on bxpush_mi

Packages that implement bxpush_mi