Hi everyone, I am not able to make the following code to open a specific file. BytesToFile(File.DirDefaultExternal & "/" & AppName,vFileName,mm.Image) chatroompage.chat1.AddItem(mm.Name & CRLF & vFileName,False) Log("-----------Done-------------") 'ToastMessageShow("Download...
Edit: FileProvider is included as an internal library now. After investigating several issues with the current FileProvider code that you can find in the forum, I decided to make some improvements and implement it in a class. Starting from Android 7 (API 24) you cannot directly share file uris...
www.b4x.com
and I have modified the manifest for fileProvider
I need open the file test.pdf in DirRootExternal.
It not works.
The intent is displayed but not the file (no error'message)
There are several versioned components that affect the compilation process and the runtime behavior of our apps. The purpose of this tutorial is to explain the differences between them and help you choose which version to use. Each Android version is mapped to an api level. You can see this...
I know how get permission WRITE_EXTERNAL_STORAGE by RuntimePermissions.
In manifest, requestLegacyExternalStorage is true,but the intent is displayed but not the file. Is it possible to program the intent and File Provider for open test.pdf in DirRootExternal ?
Thanks
Sub displayPDF(FileName As String)
File.Copy(File.DirRootExternal,FileName, Provider.SharedFolder, FileName)
Dim sp As Intent
sp.Initialize(sp.ACTION_VIEW, "")
Provider.SetFileUriAsIntentData(sp, FileName)
'Type must be set after calling SetFileUriAsIntentData
sp.SetType("application/pdf")
StartActivity(sp)
End Sub