You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Android devices running Android 13 (API level 33) require that the user opts-in to receiving push notifications.
For apps targeting API level 33, there are sdk methods exposed to trigger the prompt. I'm not sure if these methods are handled by iterable-
However, for apps targeting API level 32 (Android 12) and below, the prompt is triggered only after the first time a NotificationChannel is created see details here. It looks like in the iterable-android-sdk, a NotificationChannel is only constructed after iterable sends a push notification to the device.
Example: after sending a push notification to the device, these logs appeared. A push notification was not displayed on the device of course.
When I opened the app after these logs, I saw the android prompt in the screenshot below (note: I'm using an emulator here but physical devices running Android 13 show the same behavior)
Questions
Is there any way to force the NotificationChannel to be constructed earlier, possibly at app launch?
The android docs for NotificationChannel specify that it's safe to create a notification at app startup:
Creating an existing notification channel with its original values performs no operation, so it's safe to call this code when starting an app.
Version Info
My app was built with react-native, but this appears to be an issue more relevant to the android-sdk.
Relevent version info:
Thanks for writing in and for your suggestion @alex-a-pereira.
At present, unfortunately, we don't create channels right on the initialization and rather wait for the first notification for channel creation.
Will definitely have this put up in our future feature set for discussion and prioritization.
Until then, a workaround would be to have a custom firebase class implementation as mentioned in support docs and have channel created on the app start to trigger the OS permission. Again for react native, it will have to be written in the android native part.
Description of problem
Android devices running Android 13 (API level 33) require that the user opts-in to receiving push notifications.
For apps targeting API level 33, there are sdk methods exposed to trigger the prompt. I'm not sure if these methods are handled by iterable-
However, for apps targeting API level 32 (Android 12) and below, the prompt is triggered only after the first time a
NotificationChannel
is created see details here. It looks like in theiterable-android-sdk
, a NotificationChannel is only constructed after iterable sends a push notification to the device.Example: after sending a push notification to the device, these logs appeared. A push notification was not displayed on the device of course.
When I opened the app after these logs, I saw the android prompt in the screenshot below (note: I'm using an emulator here but physical devices running Android 13 show the same behavior)
Questions
Is there any way to force the NotificationChannel to be constructed earlier, possibly at app launch?
The android docs for NotificationChannel specify that it's safe to create a notification at app startup:
Version Info
My app was built with react-native, but this appears to be an issue more relevant to the android-sdk.
Relevent version info:
The text was updated successfully, but these errors were encountered: