Titanium Android module for pdf -


has found way open or view pdf file on android?

is there module in titanium open pdf file within android app.

either use , intent open in end-users pdf reader if need open in app can use library: https://marketplace.appcelerator.com/apps/6897?restoresearch=true#!overview

intent:

    try { var f = ti.filesystem.getfile('your.pdf'); ti.android.currentactivity.startactivity(ti.android.createintent({     action: ti.android.action_view,     type: 'application/pdf',     data: f.getnativepath() })); }     catch (err) { var alertdialog = titanium.ui.createalertdialog({     title: 'no pdf viewer',     message: 'we tried open pdf failed. want search marketplace pdf viewer?',     buttonnames: ['yes','no'],     cancel: 1 }); alertdialog.show(); alertdialog.addeventlistener('click', function(evt) {     if (evt.index == 0) {         ti.platform.openurl('http://search?q=pdf');     } }); 

}


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -