0

I'm working on an Android app that gathers the entire phonebook content on the device and sends the data over to a PHP script running on Apache for further processing.

My question is, which of the following is the most efficient method of pushing this data over?

  1. Write data into a plain-text file and send it over to PHP where it'll be parsed and further processed as needed.
  2. Send the data in the form of a basic key-value pair array via HTTP-POST; the PHP script can then easily retrieve the information off the $_POST array.

Also, please do suggest if there's a more efficient alternative to the above two, e.g., JSON, etc.

Needless to say, the payload will vary wildly depending on the number of entries in the user's contact list.

Opal
  • 81,889
  • 28
  • 189
  • 210
TheLearner
  • 2,813
  • 5
  • 46
  • 94
  • Try replacing the tags "post" and "text" with something like "api". – Will May 03 '15 at 08:12
  • in this post are some interesting details for you. http://stackoverflow.com/questions/12475116/how-to-send-large-data-using-post-method – webcodecs May 03 '15 at 08:43
  • hmmm.... if you're trying to modify contact data, I'd say do it on your phone, or retrieve the required change on the java side and process it on the phone (that would be the most efficient way) – Shehabic May 03 '15 at 08:44
  • Ummm...not modifying anything. Just retrieving it and dumping it in a MySQL table. – TheLearner May 03 '15 at 08:47

0 Answers0