Transfer sms/mms/contacts from android to web server - java

Before downvoting, please note that I am only asking for expert opinion, and not the source code.
I am working on an android app which will sync contacts/sms/mms on a webserver.
Which of the web service technologies is suitable for this app and easy to parse on server side?
Is it correct to convert contacts etc to a text file before sending to the server as I may not be able to convert mms and picture messages to a text file?
I want users to restore their data from the server. Will there be any problem regarding data format while downloading data to mobile?

REST web services are generally the best way to go for mobile devices as they are light weight meaning they require less processing and phone resources to use when parsing responses in JSON.
Heres a link to a question that deals with accepting an attachment over a REST web service in java
How do I write a restful web service that accepts a binary file (pdf)
However REST isn't as secure as SOAP, given its going to be personal data you may want to consider this. Also from experience of whats been happening in the news with this kind of data being taken off of phones you may want to consider not doing this at all as it can become a data privacy law nightmare.

Related

Sending and receiving data from an Android application to a web hosted Java application

I've been looking around all morning, and can't seem to figure this one out. I know it's not as complicated as I think it is, and all I need is just some pointers to the right direction.
I have an Android application that takes some user input, sends it to a Java application over the web, and then receives some output based on the input.
My Android and Java applications are ready, but how do I go about sending and receiving the data over the web? I understand that I'll be sending and receiving HTTP requests, but my problem is where I'll be sending them and receiving them from. Do I host my Java application on a Servlet like Tomcat, or do I use something like OpenShift to host my application for me?
I have no trouble with sending some HTTP request from my Android application to the web and receiving some output back, but my problem is that my web service needs to use a Java library to process the input and generate the output. I'm just not sure how I'm supposed to get this data to and from this Java library that needs to be hosted on the web.
I hope my question makes any sense.
EDIT: Perhaps I wasn't clear with what exactly I need help with. I do realize that the architecture I use doesn't really make any difference, but the problem I have is with how I'm supposed to use this architecture.
Let's say I have a registered domain name that I can easily send to and receive data from using my Android application - no trouble with that. But how am I supposed to integrate my Java library with this server? Do I just create an applet and put it on my server? Does my web host even allow Java applets to run?
I guess my question is how I'm supposed to get through the "barrier" between my HTTP request / transport layer protocol and my Java application.
Server architecture usually does not matter. You can use Java, NodeJs, Rails, Python, .NET, etc. You just need an endpoint that accepts a HTTP POST/PUT/GET/DELETE/PATCH verb.
This is more a question of "how do I set up a server to accept input" and its a very large topic in itself. I would advise you look at PAAS solutions like:
Parse.com
Kinvey.com
You can use their tools to build a solution fairly quickly. If you need something custom you'll need to build your backend in the language of choice and host it online via AWS, Google Cloud, Heroku, a VPS or something similar.

Apps updating their website

I have an app [Android] that will basically give me numbers and I need those numbers to be sent to a website hosted via "Apache" (Haven't worked that out yet).
The reason why I am asking it here is because I do not know the first thing about making applications connect to a website in way where it updates a variable each time it is calculated on that app.
Any few tips or advises would be great! [I know how to use HTML, a bit of java scripting, MySQL and lots of java]
What language should I be using. How does the server work and how do we make the app and the website work concurrently, or in parallel?
This is question is too broad, still I am listing few ways
Generate the data on application
Send a custom broadcast whenever the data is generated.
Start an Intent service from the Broadcast Receiver.
Post to server i.e to a REST or SOAP service using Http post and basic name value pairs.
At your server side, you need a service which receives the posted data and saves it to the database or any where you want.

Redirect Restful directly to Couchbase to reduce encoding decoding

Could any one of you suggest what would be the proper solution to this design.
Here is what I'm trying to accomplish and I'm not sure whether it's all possible.
Infrastructure
Android > Php ZF > Couchbase
So all communication is done using Restful. Currently how it works in my apps is as follow. Android requesting an image file say jpg/png to my apps via Restful. Myapps needs image file stored in the Couchbase so it contacted Couchbase via Restful, received file in apps server, decode the restful from base64 back to jpg/png , Encode the data again to base64/Json, transfer it to Android device. Android device received the Json in base64, decode it back to the jpg/png.
Does this movement make sense?
So in order to cut down on decoding>encoding>decoding. I'm wondering whether it's possible for me to have my android contact the Couchbase directly via my PhpZF apps server and just do decoding once after it arrived at the android device?
Please advise? Many thanks everyone. Hope this make sense on what I'm asking for?

Storing / Retrieving App Data Online using Android

I am new to Java and Android. I am just beginning work on an app that will save information to a server that someone else from within the same company can retrieve using the same app from a different android device. I know how to simply store data on a server using simple php scripts but this is a bit more complex and involves one user writing information to the server, while another user can see / download it. Within a company there would be multiple users who have acceess to this data. So my question would be, whats the best way to implement a company-wide database that ONLY members of the same company can have access to? Sorry if this seems obvious to some of you. I am just getting started and I have 7 books on android programming and none of them describe how to do quite what I am trying to do.
To do this you need to use Android network services to access data. In other words to retrieve a networked database information your device will connect to your service with a specified URL and arguments. In turn, the service will reply with the required data, say may be in XML format. All your app needs to do is parse the XMl and display the date as desired.
Same thing applies to putting data into the server, in this case however the data will be sent as arguments to the network service URL and the service will handle the persistence to a database.
My advise is to do a Google search of the keyword "Android Network Services".

Syncing Android and Server

I don't know what this is called, but it is something like syncing android application and a Web server. Examples are RSS Feeds and Weather Forecast
Does anyone know the concept behind developing application? I mean how do you sync the Android phone with a web server. Is there any programming needed in the server side and the client side(Android)
Are there any programming books that tackles this subject? Thanks.
What should I do to connect to Server from eclipse - Android?
check the whole conversation here
The server should make the data available in a meaningfull parsable format (for machines). For example RSS/XML feeds, etc. Your application should poll frequently and updates the status/screen.

Categories