Required Permissions

barx

Well-Known Member
Licensed User
Longtime User
Can somebody take a quick peek at this project and tell me why it requires network communication permission. Nothing uses any network traffic and I fear it may put some people off using it. I'm guessing the external storage permission is required due to either the SQL or DBUTILS module.

The project isn't finished yet and there is a little cleaning up to do. And yes, if anybody notices I have used different ways to achieve very similar results. Just to see which suites me best for future use ;)

Thanks

View attachment 10521
 
Ahhhh, actually, just as I've submitted that. I'm wondering if it's because I use a webview to show some data. Though I use local data. If this is the case, is there a way to use a webview but not require said permission?

Thanks again...
 
Upvote 0
Could this be done in the Manifest editor with something like this...
Code:
AddReplacement(<uses-permission android:name="android.permission.INTERNET" /> 
, <!--<uses-permission android:name="android.permission.INTERNET" /> 
-->)
 
Upvote 0
Trying it now, First use of manifest editor.

Cheers dude
 
Upvote 0
Not working, strange. Checking the manifest, it's not replacing the text. The text is 'copy'd from the file in the first place, so it's deffo right.
 
Upvote 0
Tried that to no avail. Also tried adding " " 's. Also, tried just putting ' and <!-- -->. Nothing changes. It feels as though I'm missing a step.

I open the manifest editor, make changes and close. Click yes when it asks me if I want to keep changes.

Then compile and run.

Anything missing?
 
Upvote 0
Have you made sure that the Do Not Overwrite Manifest File option is NOT checked?

If you have other amendments, you'll need to move them to the editor.
 
Upvote 0
Not checked it tbh. Not done any previous manifesting but will check it anyway. Would deffinately explain it.

Sent from my HTC Vision using Tapatalk
 
Upvote 0
OK, tried that, still no good. It wasn't checked. Checked it (and got the 'this option is obsolete' msgbox, then unchecked it again. No change.
 
Upvote 0
Is the manifest.xml file marked as read-only? I don't know why it would be but there has to be a reason it's not updating somewhere.
 
Upvote 0
no it's not mate, already checked that. Also, renamed the file and it was re-created. This is my manifest editor window. I could be doing it all wrong. Does it look ok?

Code:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" />
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddReplacement(<uses-permission android:name="android.permission.INTERNET" />, <!-- <uses-permission android:name="android.permission.INTERNET" /> -->)
 
Upvote 0
As it's always rebuilt, there is not really a need to comment it out, just remove it. Just makes the process a little simpler. And Erels syntax in his original post says addReplacement(OldString,NewString) so they may need to be quoted strings.

Try this:

Code:
AddReplacement("<uses-permission android:name="&Quote&"android.permission.INTERNET"&Quote&" />","")

although it doesn't feel quite right with Quote, just looking for a project where I'm sure I did something similar.
 
Last edited:
Upvote 0
Found it, they don't need to be quoted so this

Code:
AddReplacement(<uses-permission android:name="android.permission.INTERNET" />,)

should work.
 
Upvote 0
Although the ones I had were missing the final space so:

Code:
AddReplacement(<uses-permission android:name="android.permission.INTERNET"/>,)
 
Upvote 0
I can confirm that:

Code:
AddReplacement(<uses-permission android:name="android.permission.INTERNET"/>,)

no space here, works.

Save the manifest editor, compile the program and check the manifest.

The prog also installs without requiring the permission and shows an empty webview.
 
Upvote 0
Although the ones I had were missing the final space so:

Code:
AddReplacement(<uses-permission android:name="android.permission.INTERNET"/>,)

Well, what do you know. removing the space before the /> did the trick. VEry strange as in the manifest it has a space in there.

Well done stevel05, :sign0098:
 
Upvote 0
ok, as previously stated, this now works, but I've just discovered an adverse effect. I've just put the app back into debug mode as I balls a bit code up and.... well......wanted to debug it :signOops:

So, I selected debug mode, and re-compiled (and run) and as the app starts I get an error stating that the permission is missing in the manifest and that debugging is disabled. :sign0148:

Is there anything I can do about this? Is it going to be a matter of commenting out the manifest edit till app is finished, then uncommenting it for final release?

cheers
 
Upvote 0
Back
Top