Android blocks non-secure (HTTP) content by default for apps targeting API level 28 (Android 9) or higher, which includes images or GIFs linked in push notifications. If the URLs for your media start with http:// instead of https://, they will not display, and you may see a "Cleartext HTTP traffic not permitted" error in the app's logs.
To resolve this:
- Ensure all URLs for images and GIFs used in your push notifications are secure and start with
https://. - Update your push notification content with these HTTPS URLs.
For example, change a URL like http://yourdomain.com/image.png to https://yourdomain.com/image.png.
HTTPS is required for media to display correctly in Android push notifications. If issues persist after making this change, check your app's network_security_config.xml or android:usesCleartextTraffic setting, and review your notification handling implementation for rich media.
Comments
0 comments
Please sign in to leave a comment.