Android Question pdf intent not working on target sdk version 28

Deepak Shede

Member
Licensed User
Longtime User
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
 
Last edited:

drgottjr

Expert
Licensed User
Longtime User
sdk 28 needed for play store (maybe still 26, but i think they up'd it to 28)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
- 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.
 
Last edited:
Upvote 0
Top