B4A Library GoogleIdentity - Sign in with Google

Discussion in 'Additional libraries, classes and official updates' started by Erel, May 1, 2016.

  1. AndOrNot

    AndOrNot Well-Known Member Licensed User

    When i try to use this library i got this error:
    Code:
    B4A version: 5.50 BETA #1
    Parsing code.    (
    0.12s)
    Compiling code.    (
    0.47s)
    Compiling layouts code.    (
    0.03s)
    Generating R 
    file.    (1.03s)
    Compiling generated Java code.    (
    9.16s)
    Convert byte code - optimized dex.    Error
    Process timed out.
    You can change the timeout value under Tools - IDE Options.
    I did not use #Escludes, because i have 5.50 beta version.. Tried to update timeout, but doesn't work.. Any help?

    Edit: fixed it, it works, but when I click on button will open the dialog and after choose account nothing appears.. what I do wrong?
     
    Last edited: Jun 5, 2016
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread and post your code.
     
  3. prajinpraveen

    prajinpraveen Member Licensed User

    is it possible to check if the user has signed in or signed out. when i close and re-open the app, i should be able to check if the user has already logged in.
    Is there a way to signout?
     
    Last edited: Jun 6, 2016
  4. Erel

    Erel Administrator Staff Member Licensed User

    It is up to you to decide how to treat automatic signing in. The library manages a single step which is the signing step.

    You can store the state in an internal file (it can be hacked) or send the state to your server and store a random id locally. This way you will be able to log in the user automatically when the program starts.

    Signing out means that you delete the local file.
     
    prajinpraveen likes this.
  5. prajinpraveen

    prajinpraveen Member Licensed User

    Thanks Erel. I will store a key locally. i would have been really nice if there was an option to log-out or deauthorize.
    at the moment once logged in you cannot log out
     
  6. RichyK68

    RichyK68 Active Member Licensed User

    Hi, I've followed the instructions (and also tried the example) but upon compiling my project or the sample project I get :

    B4A version: 6.31
    Parsing code. (0.00s)
    Compiling code. (0.89s)
    Compiling layouts code. (0.34s)
    Organizing libraries. (0.00s)
    Generating R file. Error
    ERROR: resource directory '\extra-res\identity' does not exist

    Any ideas?

    Thanks,

    Richard
     
  7. RichyK68

    RichyK68 Active Member Licensed User

    I worked it out, all good!
     
  8. RichyK68

    RichyK68 Active Member Licensed User

    Murphy must be with me today!

    It compiles now and runs, I get the sign-in button, I press it, up pops the please sign in message with sign in with google. I press it, I get a list of accounts on my phone, I select one, press OK, and the gi_Signin method is never called and I'm returned to the sign in with google prompt. So my app doesn't know what account has been selected. This does exactly the same thing on the sample project downloaded from above.

    Thanks,

    Richard
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    Why are you using this library instead of FirebaseAuth?
     
  10. RichyK68

    RichyK68 Active Member Licensed User

    Is that compatible with B4A v6.31?
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    Most probably yes.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice