I am developing offline HTML5 applications (without frameworks), currently I use Intel XDK to package but I could switch to another if necessary. The doubt I have is that since they are applications that work from the browser, the installation asks for permissions to use the internet/wifi, but since they are offline, these permissions are not necessary. How can I specify that I do not require these permissions so that it does not ask for them when installing the apps?
This Intel forum thread mentions that the Network/Internet permission is enabled by default in the version of Cordova used in Intel XDK, and cannot be disabled:
Although the post and answer are over a year old and things may have changed. In the IDE you can add permissions (in Cordova Hybrid Mobile App Settings > Building Settings > Android), but when you create a project you can't remove the Internet permission (because the list is empty).
If you use Cordova directly, you can see the permissions for android in the file:
There you will find that when you create a new application, there is this line of code:
that you can delete so that the application does not even ask for the permission of networks and the Internet.
But I don't know how recommendable it is to remove that permission. This StackOverflow question mentions that there are several permissions that are required for Cordova apps to run. And it is said that the Internet is required (because of running in the browser).
In that same question an alternative is mentioned so that no permission is requested. Add this line to the
config.xml
:In PhoneGap's own documentation (see the end) this possibility is mentioned and it says that Internet permission is required (although it is an old version and may not be up to date):
As a curiosity, I tried to create a test application, I deleted the Internet permission (leaving the application without any permission) and the app compiled and ran without problems on a tablet (the default code). The latest version of Cordova may not require any special permissions.
These are the steps I followed from the command line:
The app ran without problems and if I look in the properties (Settings > Apps > Test) I see that it does not have any permissions (if I add Internet, I see that it has "Full network access").