Android permissions issue

@antoinevg

I have been running into all sorts of odd behavior with Android as of late, upgraded to the most current versions of every module but things seems to not be working properly ( they worked fine before but now seem to fail) Anyhow, while I’m trying todebug these things I noticed that I’m getting an odd error while trying to remove files

The basic flow is, when exiting, we do a clean up of downloaded resources using file.remove(file)

However it looks like its giving this error
Requested unknown permission: android.permission.WRITE_EXTERNAL_STORAGE

and I see this as well

02-16 10:27:56.908 21604 21604 D Forge : Returned: {“content”:{“message”:“Permission denied”,“type”:“EXPECTED_FAILURE”,“subtype”:null},“callid”:“402ABC92-EB34-4E43-90A4-DE741BC8F77B”,“status”:“error”}

I have the permissions module setup to request this to write the files ( this seems to work) but it looks like it will not allow me to ‘remove’ them.

@antoinevg

So I think I may have figured out what possibly is going on…

With the update to the File and 2.9 it looks like how files are saved is a bit differnt, it no longer contains the URL portion etc. Our app relied on some of these to itentify things etc.

I have made a few modification and it looks like its partially working ( still need to do some more refactoring )

Anyhow, thought it was worth mentioning because it did not seem to be documents.

Also, side note. It looks like the migration guide has the wrong code for checking for a file but the ‘docs’ have it correct

Migration guide has “forge.file.scriptURL” when it should be “foge.file.GetScriptURL”

Ah, my apologies - I was torn between getting bogged down in the details in the migration docs but I should have born in mind that most of us have come to rely somewhat on the ambiguity of the old implementation!

Basically what happened is that Apple’s new security restrictions meant we could no longer hold direct references to items in the device gallery so there had to be a ground-up refactoring of the entire file model.

Some of the internal details may still need to change so I haven’t provided too much documentation but you can find a bit more information here:

Thank you for catching the issue with scriptURL - I’ve updated the migration guide accordingly.