13 thoughts on “‘Accounts’ in android – sample app

  1. Deepak

    Hi Ali,
    Thanks for writing such a good tutorial. This helped me a lot.
    Could you please add server side code as well & its corresponding calls in android to avoid mocked server ?
    There are many options available, I am not sure which one to use.
    Thanks

    Reply
    1. Ali Post author

      Hi,
      Thanks for your reading and interest.
      Unfortunately, writing the server code is beyond the scope of this article. However, writing the server part and its corresponding android code is as simple as writing a RESTFUL webservice.
      Regards,
      Ali

      Reply
    1. Ali Post author

      Thank you.
      They should be implemented in a class extending AbstractInterfaceImplementation.

      Reply
      1. Linus.du

        Process: linus.com.accountmanagerdemo, PID: 6764
        Caused by: java.lang.SecurityException: uid 10638 cannot explicitly add accounts of type: demo.com.accountmanagerdemo
        at android.os.Parcel.readException(Parcel.java:1693)
        at android.os.Parcel.readException(Parcel.java:1646)
        When I try to add account, I got this exception, can you help to tell me why?
        I have account and authenticator delcared in my mainfest.

        Reply
  2. George Ogar

    hi there, this is an awesome account manager library. i have successfully made a REST service and make calls to my server using Retrofit2 in a class extending AbstractInterfaceImplementation.
    when i call RegisterResult registerInServer my app force closes with this error.

    Java.lang.RuntimeException: User registration is not successful in authenticator due to the following error:/nnull
    at com.eduscence.app.accountauthenticator.activity.RegistrationActivity$RegisterAsync.(RegistrationActivity.java:100)

    but

    Reply
    1. Ali Post author

      Thanks for your interest.
      Have you checked the input params? If so, I guess the problem maybe because of inappropriate response (as needrd in RegisterResult) from the server to your registerInServer call. It would be good to check the example bundled with the library to see whether you are returning the correct format from the server.

      Reply
  3. Naveeeee

    Hi Ali,
    Can we able to allow multiple google accounts logins at a time and also sing out of individual accounts seperatly in Android. I.e user can able to login with multiple google accounts one by one with out singing of last logged in account.

    Reply
    1. Ali Post author

      Hi,
      Sorry for late reply.
      No, it is not possible to login to an app with multiple Google accounts at the same time on one device.

      Reply
  4. Kenneth

    Hi Ali

    Thanks for this great post about Android Accounts!
    Could we share the account for other 3rd party apps on the same device? which allowing SSO without signing on again.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *