Android Question Cant write to root external

robots4life

New Member
Hello, I am new to this software and am just learning the basics. I tried writing to the root external on my device (nexus 4) with this:

Dim textwriter1 As TextWriter
textwriter1.Initialize(File.OpenOutput(File.DirRootExternal, "random.txt", False))
textwriter1.Close

And it gives me the error that permission is denied.

I then tried dirdefaultexternal which gave me the error that no such file or directory exists which makes sense as the nexus 4 has not sd card.

Does anyone know what I am doing incorrectly?


Thanks
 

robots4life

New Member
I did not edit the manifest. I did, however, make the manifest.xml read only before I added the textwriter segment of the code. May that be the problem?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Yes, the checkbox should NOT be set so B4A can add permissions if a lib needs that.
 
Upvote 0
Top