S
S
SKEPTIC2021-01-26 08:12:48
Java
SKEPTIC, 2021-01-26 08:12:48

Request permission on android java files?

I'm writing a simple text editor for a mobile phone.

I started small, put 2 simple inputs, the user enters the file name into the first one, and the text into the second one. Then saves.

Initially, I encountered a problem with access to the file system. Registered the rights in the manifesto - did not help. As a result, I got to the point that such rights are dangerous and they need to be asked from the user during the work of the application. Made.

I am asking for write and read external storage. But the joke is that he asks for the rights to photos and multimedia, but for some reason he doesn’t ask for files) For example, I downloaded the file manager on my mobile phone. It asks permission for "access to photos, media and files" and my app asks for "access to photos and media"

What kind of things are these? For fun, I downloaded apk with pure and uncompiled it. The file manager asks for storage rights the same as me. What could be the matter?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2021-01-26
@402d

For simplicity, consider that there are no files on the android. Everything goes towards it.
THERE IS A CONTENT PROVIDER.
And a special case of a content provider is exporting a file and saving it to the phone's file system.
I didn't see it in Google materials. But the apple has it in the guidelines.
Save the user's work. The user started a new document.
Even after a reboot, he should not lose his job. And there at least makes a cancellation or writes it as a file when it needs to. That is, keep the current state in your caches with your teeth. And don't overwrite the file unless explicitly asked to.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question