Android NotificationManager¶
- class enamlnative.android.android_notification.NotificationManager(*args, **kwargs)[source]¶
Bases:
enamlnative.android.bridge.JavaBridgeObject
Android NotificationManager. Use the show_notification and create_channel class methods.
- classmethod instance() Optional[enamlnative.android.android_notification.NotificationManager] [source]¶
Get an instance of this service if it was already requested.
You should request it first using NotificationManager.get()
__Example__
:::python
await NotificationManager.get()
- async classmethod get() enamlnative.android.android_notification.NotificationManager [source]¶
Acquires the NotificationManager service async.
- async classmethod create_channel(channel_id: str, name: str, importance: int = 3, description: str = '') Optional[enamlnative.android.android_notification.NotificationChannel] [source]¶
Before you can deliver the notification on Android 8.0 and higher, you must register your app’s notification channel with the system by passing an instance of NotificationChannel to createNotificationChannel().
- Parameters
- Returns
channel – The channel that was created.
- Return type
NotificationChannel or None