How to Allow insecure "http" url connection in an Android App using NetworkSecurityConfig?

Опубликовано: 30 Октябрь 2024
на канале: Awesome Dev Notes
4,408
38

Useful when Glide or other image loading libraries do not load insecure http connection or WebView does not load http pages.

There could be more stricter configuration. But in general this one will do if loading "http" urls is your main concern.

NetworkSecurityConfig Code: https://gist.github.com/androiddevnot...

App used in the demo: https://github.com/Rohit-2602/Marvel_App

Reference:

https://android-developers.googleblog...

https://developer.android.com/trainin...

📚 Learn Android from Experts at:
https://github.com/androiddevnotes/aw...

😎 Find more Awesome Android Apps in Kotlin, MVVM, Jetpack:
https://github.com/androiddevnotes/aw...

📱 Follow us on:

⭐ Discord:
  / discord  

⭐ GitHub:
https://github.com/androiddevnotes

⭐ Twitter:
  / androiddevnotes  

⭐ Instagram:
  / androiddevnotes  

⭐ Medium:
  / androiddevnotes