Forgive me for being a little slow to grasp some of this stuff.
I am trying to figure out how to share a file with other apps: Android Question Need help with File Provider/FilePicker.
One of the things that has confused me is I keep reading that the code below:
and this:
Should not work in Android 7 yet the code above has been working fine in Android 7/7.1.1. I have also been moving files on and off a Windows server using SMB lib, and also copying those files in and out of both internal and external directories without using RunTimePermissions. File.DirDefaultExternal has been working just fine.
My target SDK for the apps that are doing this is 26.
Where it seems to be falling apart is Android 8.
What am I missing here?
I am trying to figure out how to share a file with other apps: Android Question Need help with File Provider/FilePicker.
One of the things that has confused me is I keep reading that the code below:
B4X:
Sub OpenPdf(FName As String)
Dim i As Intent 'Requires a reference to the Phone library
Try
i.Initialize(i.ACTION_VIEW, "file:///" & FName)
i.SetType("application/pdf")
i.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(i)
Catch
Msgbox("Error opening " & FName & CRLF & LastException.Message, "Open PDF Error")
End Try
End Sub
B4X:
If File.ExternalWritable And File.ExternalReadable Then
SKUtils.GlblNC.LD = File.DirDefaultExternal
End If
Should not work in Android 7 yet the code above has been working fine in Android 7/7.1.1. I have also been moving files on and off a Windows server using SMB lib, and also copying those files in and out of both internal and external directories without using RunTimePermissions. File.DirDefaultExternal has been working just fine.
My target SDK for the apps that are doing this is 26.
Where it seems to be falling apart is Android 8.
What am I missing here?