It is my beginning with Android and I would like to write an app to connect with certain website, then save whole html of this website to some text file. I need this to later purposes such as extracting some info from html and so on. Do I need to do it using WebView?
Details: The website contains job offers. I need to make a connection with fields responsible for description and location of a job, so my application can fill those fields. Next step would be listing all the results.
Please lend me some advice :)
Related
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
I have an app that has a web-view which has a basic web-form that has a few fields and a submit button. I would like to figure out in my app if the form has any input in any of the fields. I cannot change the form from the server side, and I can't be certain much about the fields (ids / names in the html).
In iOS we accomplish this with an interesting process of pulling all the html out when loading the form, and comparing it to the html at any given point, if they don't match, the user must have entered something into a field. I believe we were able to get the html by injecting and running some javascript into the web-view. I'm not sure exactly how to approach the problem on android, or if android has any better tools to get whether a form has been edited.
Anybody have any ideas / pseudo-code how I can tell if a form has had input in any of the fields in a webview in android?
Unfortunately, there are no special form-related tools in Android WebView either. You can use the same approach as you have described for iOS.
A couple of links to get you started:
Read HTML content of webview widgets
Android Web-View : Inject local Javascript file to Remote Webpage
I'm relatively new to mobile app development - I'm kinda learning as I go. I'm creating an app that will serve multiple purposes - notifications, audio/video, etc. One of the features of the app will be to display the contents of an unpublished book (no plans to publish it either via the traditional methods available today). Essentially, I want the part of the app to do teh following:
1) Have a menu which will server as a table of contents.
2) Display the text, which will be in English and Arabic.
3) Have the english text searchable.
4) Have the ability to favorite certain sections of the text.
Just wondering what's the best way to build this? Should I convert sections of my file to html and use webview? Or should I use textview?
I'm looking for the option that gives me the most robustness in terms of functionality, and flexibility when it comes to design (i.e. background images, custom fonts, formatting).
Thanks in advance.
WebView or HTML page is not a very good approach.
You can try an approach in which your data is stored in json format in your resources-->raw folder and then parse each element of the JsonObject to populate views dynamically.(If you have server then you fetch data via HttpConnection). For start you can see here
convert your file to html file and display it using webview container...If you have your book in word format then convert it to html file in any website and then display it using webview.
I'm trying to create a little weather app for home weather station. The weather station outputs a .txt file on an ongoing basis and I'm trying to make an android application using app inventor to read the data in the file and display it appropriately.
File is located here: http://uregina.ca/~hodder2k/realtime.txt
I am able to load the entire string into the application, but I haven't figured out a way to read and label certain columns of data within the file (ex. temperature etc).
Can this be done in App Inventor? Or should I try and switch to using the Android SDK?
Thanks
you have to parse the result you get for the information you need
see this example of a simple parse procedure
see also here http://puravidaapps.com/info.php#parse
I have some data in my app that consists of text and image. I want to allow my users to be able to print that data.
Here are the options that I am thinking of:
1) Convert data into HTMl format and allow users to email and they can print from their desktop. This will be zip file with html and images. Pros: can be easily coded. Cons: not sure if users will know what to do with zip file.
2) Convert to PDF. But I have read on forums that iText won't work on Android. So any other options to convert to PDF? Pros: PDF can be easily printed. Cons: have to figure out a way to convert to PDF.
Anybody has tried allowing their users to print data? What are the options
There is an Android app called PrinterShare that allows you to print from the phone, but I think that just prints whole documents.
To do this yourself you would want to have some sort of server on your desktop machine which uses the Java Printing API to send your document to a configured printer. I am just brainstorming here... there are a lot of details to fill in. :-)
Good luck and I hope this helps a little.