Created
May 24, 2015 14:14
-
-
Save vschmidt94/eb8a52b72d4f72240c43 to your computer and use it in GitHub Desktop.
Using Google Doc Viewer to Open a PDF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void goToRepublicRecyle(View view) { | |
| showPDF("https://docs.google.com/viewer?url=http://site.republicservices.com/site/corvallis-or/en/documents/corvallisrecycledepot.pdf"); | |
| } | |
| public void goToRepublicCurbside(View view) { | |
| showPDF("https://docs.google.com/viewer?url=http://site.republicservices.com/site/corvallis-or/en/documents/detailedrecyclingguide.pdf"); | |
| } | |
| private void showPDF(String url) { | |
| Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); | |
| startActivity(browserIntent); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment