Android Question Error With intent on some devices

MrKim

Well-Known Member
Licensed User
Longtime User
What I am doing is copying a file to File.DirDefaultExternal
Then opoening itwith

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
I have a tablet which is running Android 7.1.1 and this works fine.

My phone, which according to the internet (Phone version is G935PVPS9CSB1) is 8.0
throws the following error:

upload_2019-3-3_18-13-2.png


any help is appreciated.

Thanks in advance
 
Top