SimpleAuth: Add support for Android Target SDK API 23 (currently Google Sign In crashes)
If you target API 23+ the app must prompt the user for GetAccounts permission:
https://blog.xamarin.com/requesting-runtime-permissions-in-android-marshmallow/
We need to add a call to CheckSelfPermission.
Without that, I am finding that Authenticate() throws an exception, which I catch, but even so my app terminates with:
System.InvalidOperationException: An attempt was made to transition a task to a final state when it had already completed.
at System.Threading.Tasks.TaskCompletionSource`1[TResult].SetResult (TResult result) [0x0000c] in /Users/builder/data/lanes/4468/f913a78a/source/mono/mcs/class/referencesource/mscorlib/system/threading/Tasks/TaskCompletionSource.cs:322
at Android.Gms.Extensions.GoogleApiClientExtensions+<BuildAndConnectAsync>c__AnonStorey0.<>m__0 (Android.OS.Bundle hint) [0x00000] in <1db671c6182d42a7b22c48ed6b33a584>:0
at Android.Gms.Common.Apis.GoogleApiClientConnectionCallbacksImpl.OnConnected (Android.OS.Bundle bundle) [0x0000d] in <1db671c6182d42a7b22c48ed6b33a584>:0
at Android.Gms.Common.Apis.GoogleApiClient+IConnectionCallbacksInvoker.n_OnConnected_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_connectionHint) [0x00011] in <1db671c6182d42a7b22c48ed6b33a584>:0
at at (wrapper dynamic-method) System.Object:a6b03050-593a-4ddc-9bdf-441125fda0bf (intptr,intptr,intptr)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 25 (14 by maintainers)
like a noob, I forgot to push the update Try again
Nugets are live! Along with updated readme, with steps on how to implement.
Yes, that is the issue. You will need to update the app. I have had that on all my devices with a fresh os install. The latest makes it so it can recover after that. You just need to log in again once the update is complet