• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

PDF Viewer and Android

 
Ranch Hand
Posts: 36
Android Java ME
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7590
177
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic