Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6039393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:21:42+00:00 2026-05-23T06:21:42+00:00

I am a php/mysql developer learning android. I am creating an android app that

  • 0

I am a php/mysql developer learning android. I am creating an android app that receives info from my php app to create list views of different products which will open a web view of that product’s detail.

Currently my php cms web application outputs xml lists for an iphone app…. (also, separately outputs html). I have full control of the php app so if there is a better way to output the data for the android app please let me know.

I have created code that reads the xml from the web and creates the list view. The list can be refreshed daily, so the data does not need to be read from the online xml every time the app starts.

So I was thinking to store the data retrieved locally to improve my apps responsiveness. there may be up to 500 product descriptions to be stored at any given time in up to 30 different xml lists. I am starting development with one xml list with about 30 products.

For best performance should i store the product info in a sqlLite db or should i store the actual xml file in the cache/db or some other method like application cache.

I also was think to create the update of the data as a service, would this be a good idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:21:43+00:00Added an answer on May 23, 2026 at 6:21 am

    The most efficient way to store data is RAM. But if you want to cache it, then the most efficient way is Database.

    I recommend you store your data in sqlite android database.

    You could also consider zipping you xml for faster network transfer and unzipping through java.util.zip package classes. You could even consider a simpler format for transmitting data, less verbose than xml, using a datainput/outputstream.
    (I do that in of my apps and it works great)

    Here are some details on data input / output stream method :

    • imagine a proprietary protocol for your data, only what you need. No tags, no attributes, just raw values in order.
    • on the client side, get an input stream on your data using URL.getContent() and cast it in input stream.
    • on the client side still, build a data input stream encapsulating your socket input stream and read data in order. Use readInt, readDouble, readUTF, and so on.
    • on the client side, from php, you need to find a way to save your data in a format that is compatible with the data format expected by the client. I can’t tell much about PHP, I only program using java.

    The advantage of this technique is that you save bandwith as there is only data and no verbose decoration due to xml. You should read about java specs to understand how double, int, strings are written in data output stream. But it can be hard using two languages to get the data right.

    If php can’t save format in a suitable way, use xml, it will be much simpler. First try with just plain xml, then give a try using a zip or tarball or xml file.

    But all this is about speed gain during network connection.

    The second part of what you have to do is to store each row of your list in a SQL table. Then you can retrieve it pretty fast using a CursorAdapter for your list view (it breaks the charming MVC model but it is quite fast !).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a php/mysql application for a university project and I am looking
I'm building a form with php/mysql. I've got a table with a list of
I am writing a Webkit app that imports data from an RSS feed and
I'm writing a simple php/mysql script that gets all ads I have in my
Been using PHP/MySQL for a little while now, and I'm wondering if there are
I run a small php/mysql website for a camera club where users can upload
I've been doing PHP/MySQL websites with shared hosting providers for the last couple years.
I am developing a PHP/MySQL application using vertrigoserver. I need to enter the German
I'm going to be implementing a PHP/mySQL setup to store credit card information. It
I know how to do a regular php mysql search and display the results.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.