This code has worked fine to open a PDF:
Now it just gives an error message. I know I need to convert this code to use File Provider and I've followed the instructions but can't get it to work. Just crashes app. Please help with code conversion. Thanks.
Dim i As Intent Dim uri As String uri = "file://" & File.Combine(rp.GetSafeDirDefaultExternal(""), pdfurl) i.Initialize(i.ACTION_VIEW, uri) i.SetType("application/pdf") i.WrapAsIntentChooser("Choose PDF Viewer") StartActivity(i)