Paul
Paul

Reputation: 1

how to Create an APK that holds a PDF and Displays it on the home page

I'm an N0ob so easy to follow instructions please :)
I am trying to build an app to go onto a TOMTOM display, running Andriod 6.0.1.
I have 3 PDF's I want drivers in my fleet to have access to. So the APK (can be 3 separate APK's) needs to have the PDF file embedded so it loads as part of the image file... I can't go around and load the PDF's onto each device. and the APK needs to create a Home screen shortcut to each PDF.
Any ideas?? Does anyone want to make the APK for fun? :P

Upvotes: -2

Views: 321

Answers (1)

Karthik
Karthik

Reputation: 67

You can view the pdf by two ways i.e by opening by in-built browser or through the webview which is embedded in your app.

Open in webview,

Webview webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("You google drive link.pdf");

Open in in-built browser,

val intent = Intent(Intent.ACTION_VIEW, Uri.parse("You google drive link.pdf")
startActivity(intent)

Upvotes: 0

Related Questions