Best way to transfer data between smartphone and website?
I want to transfer data between smartphone and website. What are the usual and non-conventional ways to do this?
Here's what I thought so far:
- Simple HTTP GET / POST with data represented as a JSON array string, variants of this as parameter encrypted / compressed.
- Webservice call (I'm not sure if this is possible, just a guess)
- Two-way communication: "Smartphone in desktop for desktop") (cumbersome to develop / use)
Also, what do I need to consider to avoid spam / snooping?
source to share
If your goals are compelling, safety and ease of development. I would ask the client (phone) to request the server over HTTPS using POST. The transferred data must be available to your target system. URL encoded parameters, XML and JSON are good ones. Avoid binary protocols.
The downside to this approach is that the network connection from the device to the web service might not be available or expensive with the plan the user has. (this is getting smaller with the current wave of smartphones (iPhone / gPhone / Blackberry, etc.)) It's also a polling interface, so pushing data from the server to the phone is complex and depends on the user initiating an action.
Depending on your phone platform, you can also use SMS for bi-directional communication. The limitation here is privacy, bandwidth, and cost. SMS are more expensive to send ip data depending on the user plan. (and sometimes receive) The bi-directional trick is done by registering the SMS hook in the phone app. Thus, the application can be automatically launched and notified when a specific SMS is received.
Please post additional information such as target platforms and I can discuss further options.
source to share
If you are using the .NET Compact Framework and are developing for Windows Mobile, the easiest way is to use Web Services. However, .NET web services serialize everything as verbose XML, making the data sent back and forth larger than it should be. Using JSON is a good way to reduce the size of your data, even when using .NET web services (the trick is to send the entire JSON document as a single parameter). Minimizing the size of the transferred data is especially important for Smartphone applications, as your data transfer is likely to be done over the cellular network.
source to share