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
Related
I have developed simple Ruby on Rails based API. I want to use resources from my API with my Android application. My Rails backend uses devise and doorkeeper for OAuth 2 based authentication. How can I use authentication process from my Android app. Do I need to use WebView or ?
You should definitely use token based authentication. You should follow the guide from Doorkeeper's documentation, it's well documented there.
https://github.com/doorkeeper-gem/doorkeeper/wiki/Interacting-as-an-OAuth-client-with-Doorkeeper
Also, you should check how to implement this on android.
http://docs.huihoo.com/android/4.2/training/id-auth/authenticate.html
Hope this helps.
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.
i'm going to develop a sort of cloud based application. Since I develop for hobby, I don't want to pay a server.
I'm wondering if Google or Facebook allow user to sync sqlite OR json databases through their server. For example: I'd like to sync - after the Google+ app login - the data of my app, so that the same person, on his tablet, can use the data he produced on the smartphone. Can anyone point me out some documentation that explain me what services should I use and how? Thanks.
With every Google account comes Google Drive. That link leads to the documentation for their API, but you will want to use their libraries as I presume.
Basic understanding of OAuth workflow can be beneficial.
My Database is located at SQLAzure and i am trying to use oData to get records. I have used oData4j java library as i am developing android application. Everything is working fine.
I am able retrieve data from SQLAzure using oData4j library but the problem is ...
If someone gets my SVC file URL, so they can easily get my database and play with it. so i want to put authentication so that only authorized person can retrieve data and work with it.
How can i achieve this. I have not created oData PRoducer or SVC file. All this thing is done by SQLAzure.
thnks
There's a series of blog posts about OData services and authentication: http://blogs.msdn.com/b/astoriateam/archive/tags/authentication/
Did you look at the ACS access keys? I haven't personally used them, but this is meant to provide a form of federated identity so that you can manage who can consume the oData service. ACS is a service provided by the Azure platform.
Since you can map each ACS to a specific database user, you have complete freedom to ensure only authorized people can access you data.
Take a look at the following post. This has pointers to odata and authentication related blog posts from Astoria Team:
http://kashyapas.com/2011/05/odata-and-authetication/
That should give you pointers
The sample application for Windows Azure Toolkit for Android might help.
How to: Use the Sample Android Application in the Windows Azure Toolkit for Android
https://github.com/WindowsAzure-Toolkits/wa-toolkit-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.