0 purchases
easemob apns
easemob_apns #
获取APNs deviceToken.
Getting Started #
设置权限 #
EasemobApns.requestAuthorization(
options: {
AuthorizationOptions.alert,
AuthorizationOptions.badge,
AuthorizationOptions.sound
},
);
copied to clipboard
申请DeviceToken #
EasemobApns.registerDeviceToken();
copied to clipboard
注销DeviceToken #
EasemobApns.unregisterDeviceToken();
copied to clipboard
监听事件 #
EasemobApns.setHandler(
onToken: (deviceToken, error) {
debugPrint("deviceToken: $deviceToken, error: $error");
},
onLaunch: (map) {
debugPrint("onLaunch: ${map?.keys.first}");
},
onMessage: (map) {
debugPrint("onMessage: ${map.keys.first}");
},
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.