HTTP stands for hypertext transfer protocol. It transfers the data on the mobile applications network. Website uses the http protocol to send information on the internet, also called API.
Difference between HTTP and HTTPS
The ‘s’ in HTTPS refers to secure. HTTPs in HTTP with encryption and verification . HTTps uses SSL to encrypt normal HTTP requests and responses. Website use both HTTP and HTTPS but mostly use HTTPS.
HTTP access issue in Android
Android does not allow access to HTTP URL. it displays the error message that cleartext HTTP traffic is not permitted. As clear test support is disabled by default in android 9 of API level 28.
How to resolved error are mentioned in below code:
Step 1: First try connecting the URL with https:// instead of http://
Step 2: Alloww to all connections to HTTP URLs.
Step 3: to allow connection to website
Create a file network_security_config.xml file and path is /res/xml/network_security_config.xml
Step 4: below code written in AndroidManifest.xml file.
Step 5: required permission is Internet
Happy coding!