Android app to connect to backend database / website - android

I want to setup an Android app that will connect to a backend database (web/database server that I maintain). What are some good resources for doing so?
Thanks in advance.

Watch Virgil Dobjanschi's Google I/O talk: Android REST client applications.
He goes over a good pattern to use when dealing with a web service of any kind. His example uses REST, but you could just as easily apply this to SOAP or anything else you need.

Related

Local Multiplayer Server architecture on android

I would like to create a local multiplayer server.
My idea would be like this.
Server phone starts a server and any other device calls the server over wifi and see a html5 app. So the client devices doesn't need to download the app.
Are there any good frameworks which supports such a behavior?
I found already i-jetty (https://code.google.com/p/i-jetty/wiki/ConsoleWebApplication), but according to the wiki i need to download the app before. Another thing is I dont know how to access a database over calls to the webserver.
This is a big topic you are asking. A good starting point would be to investigate web services to get your database via a web server.
I'd recommend looking at Web Services..this is a very basic link:
http://www.w3schools.com/webservices/ws_use.asp

Is it possible to use Amazon EC2 for Android syncing to cloud backend

I would like to provide syncing to cloud feature to an Android app.
I had read the tutorial at http://developer.android.com/training/cloudsync/index.html & http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html
The examples being shown is using Google App Engine as backend storage.
I was wondering, is it possible not to tie to Google App Engine platform? For instance, using Amazon EC2?
Yes it is possible but you have to do more work on hosting a web service in EC2. Then your Android app will connect to it like this Android example. To write data instead of reading, use HTTP POST or PUT instead of GET. You would also have to implement your own user authentication.
Sure you can. Here's the Amazon AWS SDK for Android:
http://aws.amazon.com/sdkforandroid/
Yes, you will lose a little of the ease and integration of GAE, but you will gain something in flexibility. The GAE features (e.g. user authentication) tie you into Google's Android, making it harder to support Amazon or BB Android. And GAE limits you to their transactional HTTP model of communication.

Web services for mobile necessity

I have a website and i need to make an app on android and iphone and the app has to communicate with the server,similar to facebook app.Do i need web services like SOAP for this.I read their documentation but how necessary are they and what is their main purpose? Can I do the same without using web services? my website is in codeigniter
If you need to implement web services for your app, I recommend taking a look at CodeIgniter Rest Server. This provides an easy way to implement REST web services, which are lighter weight, easier to work with, and more flexibile than SOAP.
Benefits of using a Web Service:
1 - Usability: You can develop Android and iOS apps, and both of them can use the same Web Service. Other smart phone platforms can also be developed later and use the same Web Service.
2 - Flexibility: For instance, you need to have a mechanism to talk with the database. You can implement the database transaction in your Web Service. (I have experience in using hibernate) You do not have to create a database configuration in every smart phone app. If you decide to change your database, then you just need to modify your database configuration in the Web Service - nothing changes on the client sides.
3 - Security: It is not a good mechanism to connect directly from a Mobile app to your database server. You need to have some kind of Authentication mechanism that can be provided by a Web Service.
Which kind of Web Service is better? I agree with #Justin that REST is a good approach since it is lighter, simpler to implement and more flexible.
SOAP can be a better approach when Security is the most important thing, for instance in certain enterprise scenarios. REST vs. SOAP
Are webservices necessary? Well the correct answer to your question is it depends on the app. Most apps that connect to a server to get some information use web services. However, no you don't need to write your own web services. Increasingly people are using platforms like agigee
http://apigee.com/about/products/usergrid/
So no you would not need to write your own api if you used usergrid, but you might want to if you wanted to keep the data all within your own infrastructure.

Android application with syncadapter using REST client server communication and google oauth

I am planning to develope an android app, that syncs its data with a server over a syncadapter using a REST architecture. The question is, is it possible to use the google account to authenticate the user at the server? If it is possible, how? Do you have any code snippets for me?
-
Chris
Checkout this example by google:
http://developer.android.com/resources/samples/SampleSyncAdapter/index.html
And take a look at these docs
https://developers.google.com/accounts/docs/OAuth2

Android data synchronization from device sqlite to server

In my application, I have two data management sources, one through web services and another standby in SQLite database in the device itself. In this, I want to add the feature to transfer the data from the device to server and from server to device if the web services available. Please suggest what would be the best way to perform this implementation.
Virgil Dobjanschi, author of the official Twitter app for Android, describes designing such data handling in his Google I/O 2010 presentation on Android REST client applications.

Categories

Resources