com.google.android.gms.common.api.ApiException: 16:
I had the same problem, start activity result kept coming back with RESULT_CANCELED and errorCode 16. The problem was my client configuration in Google Cloud Platform Console. I was using the regular debug and release api key. The result came back OK
when I used web application as my Google Console configuration.
Hope it helps.
I am developing an Android application using Flutter, tried to integrate Google Sign In and faced the same problem with ApiException: 16 and SIGN_IN_FAILED (instead of RESULT_CANCELED).
Application type on Firebase was set to android.
In my case, after many hours of debugging, it turned out to be a wrong SHA-1 problem.
As soon as I extracted the SHA-1 key from my project and updated Firebase console, it worked.