Android Question Chromebook / PDF Viewer

Robert Valentino

Well-Known Member
Licensed User
Longtime User
A user is running my App on a Acer chromebook CB5-571 with android 7.1.1

I normally create a PDF(s) and then display it/them with the following code.

B4X:
                       File.Copy(File.DirRootExternal, mPrintingFileName, Starter.gSharedLocation, FileName)
                   
                       Dim ViewIntent As Intent
                       
                       ViewIntent.Initialize(ViewIntent.ACTION_VIEW, CreateFileProviderUri(Starter.gSharedLocation, FileName))
                       ViewIntent.Flags = 1

                       StartActivity(ViewIntent)

Code WORKS great on all android devices and android versions (to my knowledge - no complaints from users until this Chromebook issue)

She says it is not working on her Chromebook.

I went to Acer's support page and according to them there is a PDF Viewer installed on the device by default.

SO My questions:

1) Do I need to do something different to get the PDF Viewer to start on a Chromebook?
2) Do they need to install an Android PDF Viewer for my code to work?
3) How can I identify that my software is running on a Chromebook?

I don't yet own a Chromebook so I cannot test out any of this and am looking for some help for anyone that has tried to create a pdf and view it.

BobVal
 

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Added back this line I use to have ViewIntent.SetType("application/pdf")

Still works fine on my devices will report back if this helped on theirs.

NOTE: Releasing a version today that supports sdk 27 where all previous version were sdk 14.

Maybe this is more a security issue with Android 7.1.1 and my sdk 14?
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
OK, Not sure if your MIME suggestion worked (I have to assume it has. Sent 3 Emails to user asking if this solved their problem and have not received an answer)

Thanks
 
Upvote 0
Top