Sharmaji
Sharmaji

Reputation: 599

best way to sync EPG Data from server to android

I am working over a Android Application , where i need to sync EPG (Electronic Program Guide) for a TV Application. I need to locally save data of 7 days (300 channels EPG / PER DAY)

Just wanted to make sure what should be the Best Approach

1) Fetching & Parsing API , Saving in the Local Android SQLite (Active Android) Database (7 Hits for 1 Day data sync ) and (49 Hits for 7 Days data sync)

2) Saving a Data File to Local Android and then Saving into the database.

I would appreciate if any body can please give a suggestion

Upvotes: 0

Views: 567

Answers (2)

snowman
snowman

Reputation: 123

I know this question is little dated, but came across and thought I might lend a little info. To keep any load of the box, I set a parse up on the server that gathers and holds the data. The android then makes a call or fetches a parsed file every 6 hours approx. My parse is set up as to create a file that the android basically only has to read, no real work involved. Just a thought.

Upvotes: 0

Abhishek
Abhishek

Reputation: 3584

The better approach between your 2 options should be the first one. i.e.

  1. Fetching & Parsing API , Saving in the Local Android SQLite (Active Android) Database (7 Hits for 1 Day data sync ) and (49 Hits for 7 Days data sync)

Below are some reasons what I can think of for your solution -

  1. While fetching the data you will fetch either from file or from database so why do you need to store the same data in 2 places(file and database both).
  2. While fetching the data from the database you can query for specific field, you don't need to read the complete file.
  3. Also Please Keep in mind the case if user's device is switched off for some time during a day. Synching of data should not be affected by that.

Upvotes: 0

Related Questions