Search code examples
androidgoogle-plusgoogle-play-serviceskindle-firegoogle-signin

How to use Google Signin on Kindle devices


I have an app which has an option to login using Google account. This works well on devices except the ones which don't have Google account option like Kindle or don't have Google play services (I guess). How should I go about adding that option on those as well?

I have tested it on Kindle device on testobject.com and when I click Google login option, it doesn't do anything.

Any help is appreciated.

Thanks!


Solution

  • 1 - the way your current implementation of Google sign-in works is that it connects to Google Play Services on the device, which handles the communication/authorisation with Google servers.

    2 - Google Play Services are not and will not be available in devices that do not have Google Play devices.

    putting 1+2 = you will not be able to use this method for those type of devices. I believe Google provides web-based authentication, which you can call from a webview in your app.

    So the pseude-code will be something like:

    if(isGooglePlayServicesAvailable(){
        doGooglePlayLogin();
    } else{
        doWebViewLoging();
    }
    

    I won't go to the details on how to the webview because I'm sure that, now that you have the proper direction, you can read the developer docs and implement it yourself =)