If File.Exists(File.DirInternal, inp_filename) = True Then
FProvider.Initialize
File.Copy(File.Dirinternal, inp_filename, FProvider.SharedFolder, inp_filename)
Dim in As Intent
in.Initialize(in.ACTION_VIEW, "")
FProvider.SetFileUriAsIntentData(in, inp_filename)
'Type must be set after calling SetFileUriAsIntentData
in.SetComponent("android/com.android.internal.app.ResolverActivity")
in.SetType("application/pdf")
StartActivity(in)
End If
It works fine, but only for part of devices . Some part of devices give us error like this:
error description:
android.content.ActivityNotFoundException: Unable to find explicit activity class {android/com.android.internal.app.ResolverActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
Is there some stable solution how to open PDF file? . It means for all devices with SDK-25 and higher.