M mauro vicamini Active Member Licensed User Longtime User Mar 6, 2018 #1 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 Code: Copy 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.
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 Code: Copy 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.
Erel B4X founder Staff member Licensed User Longtime User Mar 7, 2018 #2 You can check whether the URI ends with .pdf and parse the last section, though there is no guarantee that the URI includes the file name. Example of accessing the URI resource: https://www.b4x.com/android/forum/threads/receiving-shared-images-from-other-apps.81041/ Upvote 0
You can check whether the URI ends with .pdf and parse the last section, though there is no guarantee that the URI includes the file name. Example of accessing the URI resource: https://www.b4x.com/android/forum/threads/receiving-shared-images-from-other-apps.81041/