N
N
nikita0710032021-08-02 15:16:50
Java
nikita071003, 2021-08-02 15:16:50

How to select a file and get its uri via contracts?

The user presses the button, the file explorer opens, he selects the one he needs, then he needs to get the uri of the file to encode it in base64 and send it as a post request.
I figured out the encoding, nothing complicated, but I can’t get the file. There used to be OnActivityResult, now it is outdated and there is no point in adding it to a new application. Need through contracts, but how - I don't know

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question