Can a Phonegap app run with out NETWORK permission - android

I had develop an app which is not using any Internet settings and not accessing network state in phonegap version 1.7 but the app is not running with our using below permission
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
in the manifest

if you have tried searching you might got your answer a bit earlier than this
Are all those permissions needed by PhoneGap on Android?

Related

IONIC Application showing no internet connection

I have successfully installed cordova network plugin and no errors so far from the code side.
When I use ionic serve to get the app to run on my browser, it detects my wifi and the plugin recognizes a connection, and if i disable wifi on my computer, it again recognizes that there is no internet connection.
The problem now comes when I install the app onto an android phone after building. I even have Bluestacks on my computer but the app does not get the network from there too. Has anyone run into this problem? How did you go through it?
I do not think it is an issue with my code, so I am not posting code, unless someone will need it for clarification.
I hope someone is able to help.
Permission in androidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
config.xml do include:
<access origin="*" />
Problem Solved : As Permission Issue Held Due to Permission Was Listed in Dangerous Permission.
I Lowered my TargetSDKVersion

Android 6.0 Marshmallow and permissions

I built an application that uses the following permissions:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
When i try to install it manually on my android device (Android version 6.0.1) i get the following message:
Do you want to install this application? it does not require any special access.
But in fact it does require some special accesses, by the way, when i test on Devices with android 5.1 and prior, i was shown the permissions and asked to accept them.
this is a problem because i have to manually toggle the permissions on in the android settings in application management when on android 6.0.1 so the application works normally.
is there anything i have to add to my code to fix the issue for android 6+ ?
Another strange issue i noticed, at the page of my application on Playstore (close alpha testing for now) i get the following message in Permission details under developer section:
Item not found.
and this i get only on my android 6.0.1 device, and not in devices with prior versions.
Because the android M permission handle it differently, you need to ask the permissions at runtime
Take a look here :
https://developer.android.com/training/permissions/requesting.html
You need to ask for permissions at runtime in android 6+. This is the reason why no permission is asked when you are installing your application like its asking in android lollipop. Visit android developer page to learn how to ask for permission for android M and above visit : https://developer.android.com/training/permissions/requesting.html

Not able to get signature|system permission on an app installed as a system app

I am trying to develop an application where I have to use a permission "android.permission.READ_NETWORK_USAGE_HISTORY" which is protected by "signature|system" protection level.
To use this permission I have copied my apk to /system/app/ location of android 4.4.2 avd to make my application work as a system app.
But when I run the app i get a SecurityException
Caused by: java.lang.SecurityException: NetworkStats: Neither user 10052 nor current process has android.permission.READ_NETWORK_USAGE_HISTORY.
I have properly specified the permission in manifest and even installed my app as a system app which should sufficient to use any api protected by above mentioned permission.
Now the question is why am I getting the security exception when my app is eligible to get that permission.
Permission Details :
https://android.googlesource.com/platform/frameworks/base/+/master/core/res/AndroidManifest.xml
Try to add below permissions as well to your manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
You can't just say that an app has become a system app by just copying it into system/app folder.The main pre-requisite to make an app as a system app is that the app needs to be signed by the same signing keys with which other system apps on the device have been signed with.For a hardware device,these are the keys which the manufacturer uses while signing the OS on the device.

Android application using phone gap

I successfully completed my application in android and is running in real device and simulator .My app requires internet access hence given access in manifest.xml file.
The code is like this:
uses-permission android:name="android.permission.INTERNET" />
uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Now the problem is my app is running only when the wifi is ON but not running through the internet connection in mobile. I have to run the application with out wifi in my device.
I am using Apache 2.2.0 version. okay, no problem my issue is solved I added code lane super.setIntegerProperty("loadUrlTimeoutValue", 100000); and now it's running.

AIR Android application remote debugging

I have my AIR application created in Flash Builder 4.6, and trying to debug it on the device via USB. Application gets deployed properly, but doesn't connect to the internet. I have permissions set properly to
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
When I export release build and deploy it on the same device, it gets connected to internet without any issues.
Any ideas how to fix it?

Categories

Resources