Push class abstract

Constructors

Push()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

getIntentStream Stream<String>
Obtains the intent stream that emits custom notification intents from remote messages.
no setter
getMultiSenderTokenStream Stream<Map<String, dynamic>>
Obtains the stream of multiSenderTokenEventChannel.
no setter
getRemoteMsgSendStatusStream Stream<String>
Obtains the stream of remoteMessageSendStatusEventChannel.
no setter
getTokenStream Stream<String>
Obtains the stream of tokenEventChannel.
no setter
onLocalNotificationClick Stream<Map<String, dynamic>>
Obtains the stream of localNotificationClickEventChannel.
no setter
onMessageReceivedStream Stream<RemoteMessage>
Obtains the stream of remoteMessageReceiveEventChannel.
no setter
onNotificationOpenedApp Stream
Obtains the stream of notificationOpenEventChannel.
no setter

Static Methods

cancelAllNotifications() Future<void>
Cancels all pending scheduled notifications and the ones registered in the notification manager
cancelNotifications() Future<void>
Cancels all pending notification messages registered in the notification manager.
cancelNotificationsWithId(List<int> ids) Future<void>
Cancels all pending notification messages by a list of IDs.
cancelNotificationsWithIdTag(Map<int, String> idTags) Future<void>
Cancels all pending notification messages by a Map of keys as IDs and values as tags.
cancelNotificationsWithTag(String tag) Future<void>
Cancels all notification messages with the specified tag.
cancelScheduledNotifications() Future<void>
Cancels all pending scheduled notification messages.
channelBlocked(String channelId) Future<bool>
Checks whether a notification channel with the given ID is blocked.
channelExists(String channelId) Future<bool>
Checks whether a notification channel with the given ID exists.
consentOff() Future<String>
Disables the function of receiving messages from the User Engagement by Push service.
consentOn() Future<String>
Enables the function of receiving messages from the User Engagement by Push service.
deleteAAID() Future<String>
Deletes a local AAID and its generation timestamp.
deleteChannel(String channelId) Future<String>
Deletes a notification channel with the given ID.
deleteMultiSenderToken(String subjectId) Future<String>
Deletes a token that a target app developer applies for a sender to integrate Push Kit in the multi-sender scenario.
deleteToken(String scope) Future<String>
Deletes the push token.
disableLogger() Future<void>
Disables HMS Plugin Method Analytics
enableLogger() Future<void>
Enables HMS Plugin Method Analytics
getAAID() Future<String?>
Obtains an AAID of Push SDK
getAgConnectValues() Future<String>
Obtains values from the agconnect-services.json file.
getAppId() Future<String>
Obtains the Application ID from the agconnect-services.json file
getChannels() Future<List<String>>
Obtains the list of all notification channels.
getCreationTime() Future<String>
Obtains the generation timestamp of an AAID.
getId() Future<String?>
Before applying for a token, an app calls this method to obtain its unique AAID.
getInitialIntent() Future<String?>
Obtains the custom intent URI of the notification message which launches the app.
getInitialNotification() Future
Obtains the object that includes remoteMessage, extras and uriPage of the notification message which launches the app after being tapped.
getMultiSenderToken(String subjectId) Future<void>
Obtains a token that a target app developer applies for a sender to integrate Push Kit in the multi-sender scenario.
getNotifications() Future<List<Map<String, dynamic>>>
Obtains the list of all active notification messages.
getOdid() Future<String?>
Obtains an open device ID (ODID) in asynchronous mode.
getScheduledNotifications() Future<List<Map<String, dynamic>>>
Obtains the list of all pending scheduled notification messages.
getToken(String scope) → void
Requests a token that is required for accessing Huawei Push Kit.
isAutoInitEnabled() Future<bool>
Checks whether automatic initialization is enabled.
localNotification(Map<String, dynamic> localNotification) Future<Map<String, dynamic>>
Pushes a local notification message instantly.
localNotificationSchedule(Map<String, dynamic> localNotification) Future<Map<String, dynamic>>
Schedules a local notification message to be pushed at a future time.
registerBackgroundMessageHandler(void callback(RemoteMessage remoteMessage)) Future<bool>
Defines a function to handle background messages.
removeBackgroundMessageHandler() Future<bool>
Revokes the background message handler.
sendRemoteMessage(RemoteMessageBuilder remoteMsg) Future<String>
Sends an uplink message to the app server.
setAutoInitEnabled(bool enabled) Future<String>
Determines whether to enable automatic initialization.
showToast(String msg) Future<void>
Utility for showing an Android Toast Message
subscribe(String topic) Future<String>
Subscribes to topics.
turnOffPush() Future<String>
Disables the function of receiving notification messages.
turnOnPush() Future<String>
Enables the function of receiving notification messages.
unsubscribe(String topic) Future<String>
Unsubscribes from topics that are subscribed to.