I made a simple currency converter application for android. For taking latest currency rates from internet, i need to give permission to connect internet from manifest file.
I added this line to manifest file before
<uses-permission android:name="android.permission.INTERNET" />
I created an apk file of the application and installed it to my phone. Android version of my phone is 4.4.2 and when my wifi is open it gives error. When my wifi is closed the application is opened but can't take xml data. I installed apk file to phone of my friend and anroid version of his phone is 6.0. It works in his phone without any problem.
I added this lines to manifest file
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
but it didn't work in this way as well.
In build gradle file compileSdkVersion 23, minSdkVersion 19, targetSdkVersion 19.
Could you please help me to solve this problem?
Thank you