Fixed
- On Android 12 (API 31) and later, if the image of a push notification fails to download, the SDK now tries the download once more when a network is available, and adds the image to the notification that is already showing (#1109). This covers cases like Android blocking the app's network while the app is in the
rareApp Standby bucket. The notification is still shown right away without the image, as before, and adding the image doesn't make a second sound or vibration. The retry is skipped if the notification was dismissed, is more than 24 hours old, or the push has no message ID. On every Android version, the image download now gives up after 15 seconds without connecting or without receiving data, so a stalled download no longer holds back the notification. Thanks to @konrad-journi for the report. IterableInAppManager.showMessageis now safe to call from any thread. Called off the main thread, it posts the display to the main thread instead of running it on the caller thread. Since 3.9.0, a host activity that is not aFragmentActivity(for example a Jetpack ComposeComponentActivity) uses the Dialog renderer, which crashed withIllegalStateException: Method addObserver must be called on the main threadwhenshowMessagewas called from a background thread, including the React Native bridge thread. Calls from the main thread still display synchronously. Called from another thread, the message's read and consumed state are updated aftershowMessagereturns. Like iOS, display always happens on the main thread.
What's Changed
- Remove obsolete AI integration files by @franco-zalamena-iterable in #1105
- [SDK-871] Retry the push notification image once on API 31+ when the download fails by @franco-zalamena-iterable in #1110
- [SDK-791] Display in-app messages on the main thread when showMessage is called off it by @joaodordio in #1102
- Prepare for Release 3.11.2 by @github-actions[bot] in #1118
Full Changelog: 3.11.1...3.11.2