1

Can we give the permission of the android manifest file in the java file. if we want to take the permission of internet() in our application ,so can we give it in the java file.

0

3 Answers 3

2

No. The requested permissions are also used to show to you in the market for example, it would be strange if you could later on add internet permissions to the program.

You either need the permission (even if it is only once/sometimes) or you don't. And you need to specify that in the XML. There is no valid reason to even want to do so in the code: if you need internet, you need to request the permission. It's as simple as that :)

1

Its a thumb rule in android.......... Any permission needed, is to be specified in the AndroidManifest.xml file. Android manifest configure, install, and runs the App... Its a centralized location to check various parameters of the app.

0

no you can not do this because all the file and folder are initialize in the starting so you can not change any kind of file and folder at run time or in other source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.