Android & OAUTH 2.0 - android

I cannot work this out to save my life!
So, I have a Codeigniter based REST api with an OAUTH 2.0 (draft 23 or something) server for my own auth system (not using Twitter or FB)
I want to be able to use this to allow users to "log in" to my Android app.
I can't find any information about this on the internet anywhere. There are a couple of unsupported OAUTH 2.0 client libraries out there, such as Leeloo (which moved to Apache Amber, which hasn't been updated for over a year, and there have been no releases under Amber).
My questions therefore are:
Is OAUTH 2.0 too new? It seems to be a couple of years old... is it still too new to work with. Should I be using OAUTH 1? (which seems to be unsupported anyway - all the codeigniter OAUTH 1 libs have moved to 2.0).
Should I be using a completely different technology? e.g. I have heard of "xauth". Again information on this seems to be pretty sketchy.
Is it something easy enough to do myself? It doesn't appear so, but do most people just create their own homebrew solutions? I can't find much info about this either.
Any help you can give me will be great. Any resources you can point me too as well will be pretty amazing.
Thanks for your time.

No, OAuth 2.0 is old enough to be supported by some good open source libraries. You could e.g. use scribe.
Sorry, I don't know enough about XAuth yet to help you with that.
Yeah, it's really easy using scribe. To support a custom Provider you simply have to extend org.scribe.builder.api.DefaultApi20. As your using the same Draft of OAuth 2.0 as Google does, you can use the implementation for the Google API in Thomas Bruyelle's fork of scribe as a blueprint. This article should get you started for using scribe with Android. You could further check out the Google example from the scribe fork here.

Related

Android OAuth 2.0 and OpenID Connect Provider

I created my own OAuth 2.0 and OpenID Connect Provider using IdentityServer4 in ASP.NET Core. I am now trying to create an Android app (my very first Android app) that uses my provider to authenticate the users, using the Authentication Code + PKCE flow.
I looked around for a client SDK for Android, and found one called AppAuth, https://github.com/openid/AppAuth-Android. But it looks like it is not to a full release, since that last release was 0.7.1, which was released a year and a half ago. Should this be used? Should I worry about it not being >= 1.x.x? Any good tutorials on implementing the Authentication Code + PKCE flow?
I also heard that maybe AccountManager might be what I am looking for. I could not find any documentation on how to implement OAuth 2.0 and OpenID Connect flows via AccountManager. Anyone know have a good tutorial how to do this?
Any other suggestions on how to get this working?
Interested in thoughts on alternative standards based libraries also.
As far as I'm aware this remains the most respected library that works across vendors - but they have been struggling for contributors.
The likes of Okta and Auth0 have good Android libraries worth borrowing ideas from. They may be vendor specific in places though.
Out of interest I integrated AppAuth into a fairly complete (Kotlin / Single Activity) sample recently, so it seems to work fine with the latest Android tech:
Write up + code sample
I found the reliability and usability tricky, since Chrome Custom Tabs adds some technical complexity.

Integrate Aweber in Android?

How to integrate Aweber in android ,i research lot but there is no source code for this, so please help and should be appreciated
AWeber doesn't currently have a ready-made Android client library. You can approach this in a couple of ways:
One possibility is to implement your own API code. AWeber's API uses REST-based resources over standard HTTPS, and uses oAuth 1.0a for authentication. There should be libraries available for Android development that can accomodate your needs - I know that there have been successful "home-rolled" Java, .Net, and other integrations done by third parties so I don't see why Android should be any different.
In this case, I would suggest using the official Python or PHP library as an example of how your code can be implemented. In particular the PHP library has all of the oAuth code out "in plain sight" so it's useful in gaining insight into how authentication works.
Another interesting possibility is to attempt to use the AWeber Python module along with some of the open source projects out there that purport to allow developers to use Python on Android. I find this possibility personally intriguing but I haven't had the spare time to try it out.
While AWeber doesn't currently offer support for Android itself, the API team has documented the authentication process in some detail here:
https://labs.aweber.com/docs/authentication
That reference may help you out if you decide to go the route of rolling your own library.
If you run into any issues with your library, definitely contact the API Support team at api#aweber.com - while they may not have direct support for Android right now, they can often be of assistance in debugging your own library based on what they see on the server side.

SalesForce with Android?

I want connect sales Force from my Android Program please suggest which one is correct way to achieve this I am new to sales Force I have some knowledge in Android Application Developement.
Thanks in Advance.
You definitely want to use the REST API for mobile apps. The SOAP API is really heavy, and is better for Server-to-Server integrations. The best way to get started building an Android app for Salesforce.com is to take a look at the Salesforce Mobile SDK for Android:
http://wiki.developerforce.com/page/Mobile_SDK
There's a very helpful getting started PDF linked on that page.
However, the SDK is meant mostly for starting new apps, so you'll have some work ahead of you integrating it into an existing application. The main things you want are the oAuth 2.0 User-Agent login and REST wrappers.
You may also find this app useful -- I put it together for a presentation at Dreamforce '11, which was shortly before the Mobile SDK for Android came out, so I wrote the oAuth and REST stuff myself. Might be a simpler starting point for you.
https://github.com/tomgersic/DreamforcengerHunt
Hope that helps!
You can either use the RESTful interface or the SOAP webservices. The latter is a bit easier to deal with IMHO.
Under setup in salesforce, download the partner or enterprise WSDL (partner = generic, enterprise = specific for your SF-instance). Now with wsdl2java you can create Stubs for those wsdl entries. Import those into your android app and use them. See here for a Java Exampe by Salesforce.com.
Be sure your user has the permission to "do API". You might want to look into SSO if you want to make a "production"/commercial app. Also, to login, remember to use the correct password, you might need to add the API key (generate using the Setup tab in SF). Hope this helps.
Try checking out some of the open-source SDK projects the developer evangelists have added to the forcedotcom github
Lots of good examples on different platforms, including android with phonegap/html5 and a native SDK for android (iOS and Android) to get you past authentication and onto building your app.
Salesforce Provides mobile SDK for development on mobile device, here is the link for android SDK:
http://wiki.developerforce.com/page/Getting_Started_with_the_Mobile_SDK_for_Android
You need to:
Download SDK.
Add a sample project included in SDK's native/SampleApps folder(make sure you check include to the workspace while importing the project).
Get your remote access form salesforce and update in your app.
--This should get you started with a sample app form salsforce.
After this you need to modify existing code to your own code.
You can go to trailhead and start browsing on it, while working with your own application you will have to learn a lot about smartStore and smartSync,
I did implemented A smartStore App with using salesforce as database provider, if you want i can upload it to drive and share a link to you and
if you have any doubts about using or understanding the flow be free to ask..

Bing Wrapper for Android

We are working on an Android Project.Since Google Translate API was deprecated we are working with Microsoft Translator (BING). Is there a suitable wrapper for Bing on Android ?
The Microsoft Translator API is free for up to 2 million characters per month usage.
It supports the languages listed here: http://msdn.microsoft.com/en-us/library/hh456380.aspx
It's a little confusing right now about how to access because they're in the midst of a transition from a Bing AppID mechanism for authentication towards an Azure Marketplace OAuth based one.
Details on signing up for the service and getting OAuth credentials are here:http://blogs.msdn.com/b/translation/p/gettingstarted1.aspx
The translator service can then be accessed via an HTTP service, or a SOAP Web Service. I haven't tried SOAP on Android, but if your tools can generate a proxy class (like VS does for C#/VB developers) that would be far and away the easiest way to access it.
Hope that helps!
Maybe Try looking at the second answer by "Chillie" here. I'm not too familiar with this, but seems like it can be set up using "SOAP". Hope that helps.

Facebook Connect vs facebook-android-sdk on Android

I am trying to add a social aspect to my app where one can post there results (a common feature).
I have found some sites that describe how to do this using Facebook Connect http://www.mobisoftinfotech.com/blog/android/845/
and others, like the Facebook developer site point you towards using the SDK and downloading through Github.
http://developers.facebook.com/docs/guides/mobile/
Anyone have any experience with this? What is the difference between the two options and which is better for apps?
All the other questions that seem relevant are years old.
I would recommend using the Facebook-Android-SDK for a couple reasons.
It comes from Facebook themseleves. ...Perhaps this is actually a reason not to use it! :)
It uses OAuth for authentication, which is good, and it is pretty easy to use.
The Graph API. It is pretty robust, and also easy to use.
Please note that I have not used FB-Connect before, so I may be a bit biased...
Facebook Connect has been deprecated and you should use the SDK - Integrating Facebook Connect with a Web Page
I have familiary with the facebook-android-sdk I've never had a problem with it and it seems to work very well.
It doesn't really make sense not to use the native SDK unless you are using a webapp imo.
Also I think FBConnect has been deprecated.

Categories

Resources