Android Question Copy File from URI

mauro vicamini

Active Member
Licensed User
Longtime User
Hello Everyone,
I've an application that recives from other applications, that modify PDF file, an URI of the PDF modified.

I get the uri in this way

B4X:
    If IsRelevantIntent(Activity.GetStartingIntent) Then
        Dim in As JavaObject = Activity.GetStartingIntent
        Dim uri As String = in.RunMethod("getParcelableExtra", Array("android.intent.extra.STREAM"))

I get an URI like:

"file:///storage/3363-6433/Android/data/com.edatalia.signply/files/TER_772_201803021131.pdf"

or

"content://com.adobe.fas.Util.PDFContentProvider/cached_files/TER_772_201803021131.pdf"

dependig of which application I use to modify the PDF.

I'd like to get the file of the URI and copy it in another folder, but with the same file name.

How could I achive it?

Thank a lot for the attention.
 
Top