Following is my code written to open pdf through pdf viewer through intent. Its works fine on Target sdk version 23. If i use target sdk 23 i cannot keep my app on Google play store
Sub btn1_Click
i.Initialize(i.ACTION_VIEW, "file://" & File.DirRootExternal & "/1.pdf")
i.SetType("application/pdf")
i.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(i)
End Sub
- android.jar / targetSdkVersion / minSdkVersion
Read that thread and all Infos there. All changes regarding the TargetSDK are listed here.
- FileProvider
To share a file you need to use FileProvider. Watch this carefully.
- RuntimePermissions
To access files in der external sdcard you need to use Runtimepermissions. Also for other things. Watch the Runtimepermission Tutorial video carefully.