Currently I'm using pdfrenderer library to render pdf page and convert that page into image and showing in a view.
In this case we can't copy text from pdf page. I want to create a single project which should support both blackberry(Lastest blackberry os run android apps as well) and android.
Most of the libraries which is available are not compatible with blackberry os.
To support both, i want to load pdf file in webview using html5. Is there any way to achive this.
Please help.Thanks in advance.
I think pdf.js can help you.
I've recently search a lot about javascript pdf reader and found this as the best available solution. But I should mention that it still needs a lot to do to be a good solution
Related
I use PdfRenderer class to render pdf. However, the problem is that in this approach I can't make the hyperlinks in the document clickable.
Is there any better way to render pdf in android application?
I am aware of using webview with google docs, but I want the app to work offline so this solution is not suitable.
Try using pdfjs that is used by Mozilla.
Follow this answer
https://stackoverflow.com/a/26086480/10587375
This method works for sure on Android 4.0 and above
I am trying to achieve this in Appcelerator Alloy: I would like my users to be able to click a UI button to save a website currently shown in a WebView element for later recall. It should then work offline and include CSS and Images included in the HTML (and CSS) code. Is there any best practice to start off with here? I am targeting iOS and android with this app.
Thank you for your input!
jŒ
I will not post code here, but I can tell you what to do, as I coded the same thing a few days ago. But not with Alloy.
You have to download the html content via xhr get or post and save it into a file to the applicationDataDirectory. Then you can access to it completely whenever you want.
I want to know if it's possible to design my android app UI with HTML5 and CSS3.
If it's possible, is there any performance issue?
Android has WebView which can render HTML content, but it doesn't provide the same user experience as native apps so its use is generally discouraged.
Yes it possible. As rhoadster91 stated, you can use a normal Android WebView which loads your "index.html". All your HTML files should be in the "assets/www" directory. But you'll find plenty tutorials out there which explain everything step by step. Have a look at Googles developer site.
A second possibility would be Phonegap. It is a little tool which helps you to deploy your app for various devices (Android, iOS, WP,...) while coding your app only once in HTML.
I experimented with jquery mobile, native application and phonegap. Building a web application at first seemed very attractive at first as the coding is a lot easier compared to native applications. Here is my opinion based on my research:
Using phonegap slows your application responses, it loads slowly and together with jquery mobile the response and load time increases. So I didnot use it.
Using jquery alone was no different in Gingerbread mobile and on emulator you can clearly see the lag in switching between one div to another div. I didnot use it either.
What I did was use android Webview. I wrote my own javascript and css and placed them on the head section of my page. Used div for changing pages on button click. This approach worked really good giving nearly native performance.
I have to design a android,ios application for my website.I searched and find out that phonegap can be good one for that.Please provide me info that how to get the content of website in phonegap?On the first page i have buttons like home,contact etc.On click of home button,the home page from website should be shown.
PhoneGap is set of libraries like jQuery.
You normally write html pages and include javascript files from phonegap.
Check out phonegap example project.
Look, what you are talking about is .html,.css,.js files that you can easily get after saving any web page from your web-browser.
Rest you can use in the www folder of your phonegap project. And I
would rather suggest you to go for webview present in the native
android that is nothing but actually would provide you the same
functionality that you have been looking for.
---Edit---
Now as you have said that you want the home page buttons like about us etc. that would be copied via web browser and would be there for you as far as the html code is concerned but if you want it to look well on a small mobile device that you should create a responsive designed html and you should read some good articles about responsive web design. That would actually change your way of thinking about creating applications via html within mobile devices.
I am started developing with android,and need to use HTML5 as a cross platform technology,but i dont know about HTML5 and its behaviour with android,I searched a lot but couldn't understand that from where should i start to learn . Any suggessions appreciated.
thank you!
Hi you can check out http://www.sencha.com/blog/introducing-sencha-touch-html5-framework-for-mobile sancha touch for this.
On top of that http://www.sencha.com/blog/galaxy-nexus-the-html5-developer-scorecard/ is scorecard for the same.
you can also opt for Jquery Mobile to build HTML5 standard UI for Android.
Write Html5 code and put this in assets folder and use webView and load this open your html5 file in webView.This is quiet simple for more watch.