Internet Permission Error in Android - android

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

Related

ExternalStorage does not create files in release version

The problem is that when developing in the debug version, everything is in order, I can easily write files to memory. But I'm making a release version for Google Play, and the logs show that it simply cannot create a folder / file.
I dug up all the documentation, all the permissions are as written, but apparently I still missed something. Tell me, help
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="30" />
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
android:minSdkVersion="30"
tools:ignore="ScopedStorage" />
android:requestLegacyExternalStorage="true"

Enable permission to get WiFi details - Android marshmallow

I am using wifiwizard, a cordova plugin to get the available wifi networks in ionic framework. It works fine for all the android os except marshmallow. In marshmallow, I need to enable the location to get the same. How to resolve this issue?
Things tried:
Provided permissions in the wifiwizard-> plugin.xml.
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
Could anybody help?
Thanks in advance.
You need to update your plugins if you are using old plugins.
https://cordova.apache.org/announcements/2015/11/09/cordova-android-5.0.0.html
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

java.lang.SecurityException despite INTERNET permission being in the manifest

I am getting the following error when I run my application on my phone:
java.lang.SecurityException: Permission denied (missing INTERNET permission?)
I have already added that permission in my manifest file as follows:
<uses-permission android:name="ANDROID.PERMISSION.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
I am getting the error only when I run the app on my phone. It runs fine on my GenyMotion emulator. I read similar questions on SO before posting it. Also, I have made a couple of apps before with same permissions, and this error had never occurred then. So I don't get why Android is messing it up this time.
P.S.: I updated my SDK tools before starting with this new application. Somehow felt that it was important to mention it!
Use small caps
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Android studio Adds extra permissions to my app

I have an app which makes use of wifi permissions only but ever since I moved to android studio, the compiled apk of my app uses two more extra permissions, that is phone calls/phone id and SD read/write.
I have no idea how and why those permissions have been added to my app but many users complain about that.
My app uses google analytics from google play services and appcompat. I also make use of this line
deviceId = Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);
Any ideas? I don't want those extra permissions they scare my users away
Here is the content of manifest file
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="com.android.vending.BILLING" />
Studio is adding permissions appropriate to the classes / features that you are using in your project.
Update
Here is a related question that focuses on manifest merging config

app works on development google-play store show device incompatible

I'm developing a android app. While developing I tested it on Moto E os-4.4.4. It works properly. But after deployment playstore shows your device is incompatible with this version. It shows compatible with many other devices running same os version.
I found some similar questions I tried there answers but nothing seems to work for me.
Any help is appreciated.
Here's my manifest file
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18"
/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Not only moto e, its showing incompatible with over 1000 devices. The external libraries I've used are apptentive,flurry,facebook and actionbarshelock.
Android 4.4 is version 19. By setting a max SDK version, you're telling it not to allow install on any version over 18. So it won't consider your device compatible. Remove that max sdk version. Even google no longer checks this on the device beyond version 2.0.1.
There was some problem with google-playstore. It got solved after playstore update and now it's compatible with my device as it should be.

Categories

Resources