Jump to content

Recommended Posts

Just updated a Huawei P20 phone to Android 10, and am finding the things that it has now broken!

This code worked fine in android 9.  Using Delphi 10.4.

FileData=tfile.ReadAllLines('/storage/emulated/0/Documents/Pete/PeteADefaults.cfg')

now prangs with

Cannot open file "/storage/emulated/0/Documents/Pete/PeteADefaults.cfg" Permission denied.

Anyone got any bright ideas?  I tracked it through with F7 to FileOpen in System.IOUtils,

FileHandle := __open(M.AsAnsi(filename, CP_UTF8).ToPointer, (Mode and 3), FileAccessRights)

which returns -1.

(Can't read files or directories either - probably the same problem)

 

Edited by Chester Wilson
Added Delphi version and inability to write files and read directories

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×