I've developed a simple app that creates a PDF file which is then saved to a folder.
The app then allows the user to view the PDF using the following intent-
dim xintent as intent
Dim zpathfile As String
zpathfile="file://" & PDFfolder & "/" & "pdf1.pdf"
xintent.Initialize(xintent.ACTION_VIEW,zpathfile)
xintent.SetType("application/pdf")
xintent.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(xintent)
It works fine on my Android 5.1.1 tablet and on my Android 6.0 phone.
My friend also wants to use the app but there's a problem when he runs it on his Android 9.0 phone.
The PDF file is created and stored okay but the app crashes when he tries to view the PDF file.
I've looked at trying to use Filepicker, Fileprovider and think there must be some issue with runtime permissions.
I'm totally lost!
The app is for our use only and will not need to conform to Google Play requirements.
Could someone please point me in the right direction so the app will work on the Android 9.0 device?
Thanks
The app then allows the user to view the PDF using the following intent-
dim xintent as intent
Dim zpathfile As String
zpathfile="file://" & PDFfolder & "/" & "pdf1.pdf"
xintent.Initialize(xintent.ACTION_VIEW,zpathfile)
xintent.SetType("application/pdf")
xintent.WrapAsIntentChooser("Choose PDF Viewer")
StartActivity(xintent)
It works fine on my Android 5.1.1 tablet and on my Android 6.0 phone.
My friend also wants to use the app but there's a problem when he runs it on his Android 9.0 phone.
The PDF file is created and stored okay but the app crashes when he tries to view the PDF file.
I've looked at trying to use Filepicker, Fileprovider and think there must be some issue with runtime permissions.
I'm totally lost!
The app is for our use only and will not need to conform to Google Play requirements.
Could someone please point me in the right direction so the app will work on the Android 9.0 device?
Thanks