user2883071
user2883071

Reputation: 980

Importing html tables into an android app

I plan on displaying dates and times in an android application but I am stuck on how I would implement this.

My Idea: At the beginning of every month, a new calendar is downloaded. This information is displayed within the app and no internet connection is necessary for the rest of the app usage.

The information is in the form of an html table. How can I import this table, and display it within the App (also allowing the user to view only certain information in the table (querying the table))

Do I have to import this table into an sqlite database? or is there a less complicated way of doing this. I would like to limit the number of times the user has to access the internet, therefore it would be necessary to store the html table within the app itself.

Upvotes: 2

Views: 486

Answers (2)

Marco Acierno
Marco Acierno

Reputation: 14847

Can you create a way to access your data in a more "friendly-way"? For example you could create an endpoint online where the app will send a request, download the JSON and save that in a internal database (SQLite, check this if you don't know how).

Or, the ugly way would be to parse the table in the device using Jsoup (which you tagged). Then it's the same, you should save it in a database and read the data from there.

By the way, I would not store directly the html table, because then you will need to parse it every time you need something (p.s it will be slow)

Upvotes: 1

marco
marco

Reputation: 3242

How about save the table as an xml file? With the xml information you can query, or handle the data as array or list

Upvotes: 1

Related Questions