NotificationsListener class

NotificationsListener

Constructors

NotificationsListener()

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

bgMethodChannel MethodChannel
no setter
hasPermission Future<bool?>
Check have permission or not
no setter
isRunning Future<bool?>
check the service running or not
no setter
receivePort ReceivePort?
Get a defualt receivePort
no setter

Static Methods

demoteToBackground() Future<void>
demote the service to background
getFullNotification(String uid) Future
get the full notification from android with the unqiue id
initialize({EventCallbackFunc callbackHandle = _defaultCallbackHandle}) Future<void>
Initialize the plugin and request relevant permissions from the user.
openPermissionSettings() Future<void>
Open the settings activity
postActionInputs(String uid, int actionId, Map<String, dynamic> map) Future<bool>
set content for action's input this is useful while auto reply by notification
promoteToForeground(String title, {String subTitle = "", bool showWhen = false, String description = "Service is running"}) Future<void>
promote the service to foreground
registerEventHandle(EventCallbackFunc callback) Future<void>
Register a new event handler
startService({bool foreground = true, String subTitle = "", bool showWhen = false, String title = "Notification Listener", String description = "Service is running"}) Future<bool?>
start the service
stopService() Future<bool?>
stop the service
tapNotification(String uid) Future<bool>
tap the notification
tapNotificationAction(String uid, int actionId) Future<bool>
tap the notification action use the index to locate the action

Constants

CHANNELID → const String
SEND_PORT_NAME → const String