Building an offline android app with data from pdf - android

I have data in the pdf format(Not in english). I want to load the data to my app and app will be offline. What are the elements i shall be using in android to make the app which is like reading data chapterwise? As the data i have is huge,how to load it offline from pdf? What is the efficient way?
This is reference link for the app:
https://play.google.com/store/apps/details?id=com.winjit.hclite&hl=en

Getting the text of a pdf is a hard task in android. You can check this other similar questions to this topic which all have no straight forward answer: Link, Link, Link.
If you cant workaround this there are commercial libarys out there which you can find pretty easy with your search engine of choice (I don't want to promote them here).

Related

Converting PDF to text and reading it from android

I am currently working on an android application that will allow people to read the constitution, issue is I have only managed to get my hands on a soft copy pdf document. Ideally, I wanted an API that would allow me to fetch the document by Topic, issue or paragraph, I thought of multiple ways of getting the job done
1. Is by putting the document on the server, when user opens the app it downloads the pdf and allows them to read it(Problem with this is I won't be able to mess with the content like bold some text etc).
2. Is copying the content of the pdf into the databse and just fetching the text with a query(issue with this is I wont be able to do pagination given I put the content in one field)
Here is the link to the Constitution I needed a way in which I can load the data from the database in a way that I will be able to paginate, load a single paragraph or topic at a time. Can anyone whose been in a similar situation help me figure out the best way possible.
You don't to convert it to text, you can integrate MuPdf in your application check this answer I've found integrating pdf reader

Android WebView: offline manifest vs local files

I'm developing a simple Android App where the user must fill in a very complex form, for which I believe it's much easier to use an HTML form than an Android Activity with tons of TextViews.
The data collected by the form must be sent to some remote database, and the application must be able to work offline.
I thought of two alternatives, the question is: which one would be better?
Let a WebView load a remote website with an offline manifest
Let a WebView load a local website in assets folder
My second question is related to the storage when offline, and once again I have two options, and I don't know which one is better:
Using the HTML5 local storage, and let HTML + javascript send data to the server when online again
Let my Android app catch the form data, and handle everything the Android way.
Any input will be very helpful. Thanks in advance.
Regarding the first question: depends on how often will you need to update your form. An online cached form can be updated quickly, while bundled pages are only updateable together with the app, and you will need to consider that both legacy and new clients can connect to your server at the same time (users will procrastinate updating).
Another aspect is portability. Do you envision an iOS version of your app, or perhaps a mobile site? If yes, then an HTML5 solution is definitely more portable. Also, debugging an app which is entirely HTML or entirely native is usually easier than a hybrid one -- you can stay within a single debugger.
Perhaps, one drawback of using HTML local storage inside WebView is that the data you save will be in a kind of a "black box" -- you will not be able to back it up easily.
[Added later] OK -- one drawback of putting your site into assets folder is that you'll have to use file: scheme in order to access it. This can lead to some cross-origin loading access related issues if you will try to mix your bundled content with content from the web. Check these WebView settings for example: setAllowFileAccessFromFileURLs, setAllowUniversalAccessFromFileURLs, setMixedContentMode.

Uploading to Blobstore - Android

I am trying to create an Android app where people can read short stories. The stories will be in the form of images since it will include some arts to accompany the text. That is the reason of why I decided to use Google App Engine. I want to store the images in the App Engine then let the client device retrieve all the stories(or images). I can then somehow organise the images into the proper sequence (which I have not an idea on how to do).
I am completely new to Cloud computing or doing backend stuff so there is a lot of stuff that I am not wrapping my head around.
I did a tutorial on creating a mobile assistant app. In the end I got it working and deployed to App Engine. Whenever I upload the files I did it through the command line using "appcfg.py" however after looking at Blobstorage it seems to work a bit differently.
How exactly do you upload images to Blobstore? So far all the thing I've read is on uploading data from the client device/web application and I can't seem to find anything that is very detailed on using Blobstore and Android together. What I am trying to ask is, is there a way to upload the images to the Blobstore directly from the command line (if that is possible)? And how to handle those images once it's up in Blobstore?
Can someone give me some advice please?

xml parsing with no browser use

I have read the example for Rss Parsing from the ibm site.(http://www.ibm.com/developerworks/opensource/library/x-android/).
In this example,the rss are shown in a listview and then,if you press one announcement you can see it in the web browser of the device.How could i see them in the app,with no use of the device browser?
Thanks a lot
Create a layout with a WebView then load the URL from each "announcement" using WebView.loadUrl.
I'm a little confused but you seem to have answered your own question.
You say you don't want to use the web browser on the device but the example in your question doesn't use the browser. It does exactly what you're asking for.
The idea is that you download the html from the website and then use the parser to break it up into separate "announcements" and store them in list view items in your program.
I have done a bit of this type of thing myself in android. I used jsoup java library, which makes breaking the html into the bits you want to display really easy.
If you want some more help I can give you an example of an app I made that pulls movie times from google.com/movies as an example. here are links to the classes where I did the html download and parse:
ScreenScraper.java
HtmlParser.java

Embedded PDF's in a DROID App?

What is the best way to integrate a PDF document into my droid app?
I am attempting to recreate the same functionality we provide on our website in our mobile app.
I have 2 options of delivering the PDF to the device but the route I choose depends on the best way to implement this functionality on the device.
I could stream the document do the client and store a local temp file for viewing OR I could simply provide an HTTP URI for the document and present it on the device.
My main question is, what is the best way to integrate PDF viewing on the DROID? Can I check to see if they have Acrobat Viewer installed and make a call to the app, passing the URI data to it for loading?
I am attempting to recreate the same functionality we provide on our website in our mobile app.
Not always a good idea.
Just my thoughts here, is there a reason that it must be PDFs delivered to the device? PDF is a very poor format choice for mobile devices. There is no native compatibility for the format, they are most often laid out for print document sizes, and they do not support text reflowing. Viewing PDFs on a mobile device is more of a chore than a helpful function.
If you are looking to embed the PDF as a view in your application, then you can try this vudroid.
I have been using this by including this project as a library and some minor tweaks to the library.
They have provided a PDFView and a service which renders the view.
Works for me; a bit slow though.
Hope that helps.

Categories

Resources