• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

PDF Viewer and Android

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making an application that consists of the first page that will be a list of books. When you click on a picture book users will be able to flip through, something like a free sample. I was planning to do with Intent.So when someone clicks on a book picture, using the click listener and intent opens a new java class with PDF file. It displayed using PDF VIewer. But although I have no run-time error, on the phone throws an error that my application is stopped.

Surely my logic is wrong.

I inculded library

main_activity.xml with book list:



XML code with PDF viewer:


My JAVA class Mainctivity:


Second java class with pdf viewer:
 
Saloon Keeper
Posts: 6361
158
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every time an application crashes, the full stack trace is posted to the logcat - that includes the line number where the crash happened: Post the full stack trace here. The logcat should always be your first stop when trying to diagnose an app crash.

Also, is there any particular reason you're using an outdated version of the PDF library?
 
I'm not sure if I approve of this interruption. But this tiny ad checks out:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic