New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Android Target SDK API 23 (currently Google Sign In crashes) #30
Comments
Is this using the https://github.com/Clancey/SimpleAuth/tree/master/src/SimpleAuth.Google.Droid |
I'm using Clancey.SimpleAuth.Google.Droid nuget v 1.0.1 and Clancey.SimpleAuth 1.0.35 It was working fine until I made some changes including explicitly setting uses-sdk/targetSdkVersion... still investigating where it broke. Sorry for being premature; I no longer think that we need to prompt for GetAccounts permission. |
It's crashing after OnActivityResult, so perhaps I should try your latest changes and new Native.OnActivityResult. |
The latest changes just simplify the API. No internal changes. Updating a device to marshmallow now. |
I am getting the crash on a device with Android 6.0, in a project targeted to 7.0 (API 24). |
It is working on 7.1.1 Downgrading to 6.0 and trying again |
I was having some issues with the code in Android 6.0 as well. Just pushed a new version. This is working for me. Want to test it? |
If you confirm this fixes it for you, I can push out a new nuget today. |
No confirmation yet, sorry. I have just built SimpleAuth.Samples targeting API 25 (7.1) using Xamarin Studio 6.3 and Xamarin.Android 7.3.0.13. I am getting an "Update Google Play services" dialog which could be a clue. |
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 |
Great! I need to test the "Update Google Play" scenario so pls let me know if you update nuget... in the meantime I am still trying to build from source. |
Nugets are live! Along with updated readme, with steps on how to implement. |
It's still not working on a Nexus 5 with the latest update (6.0.1) and Google Play Services 9.8.77 (cannot be updated, not listed for this device in Google Play). Error is: Method 'Android.Gms.Common.Zzc.IsGooglePlayServicesAvailable' not found. |
Are you on the latest? https://github.com/Clancey/SimpleAuth/blob/master/src/SimpleAuth.Google.Droid/Google.cs#L193-L201 That code fixes that error you ran into. It happens due to google changing the obfuscated namespace underneath. Xamarin is working on a better fix to prevent this from happening. Also if you build against Xamarin.GooglePlayServices.Auth 42.1021.1 you should be fine. Would you mind updating or trying the from source? |
Trying to build from source (current github master), but I'm getting "Error while trying to load the project: Unknown solution type" for SimpleAuth.Droid, SimpleAuth, and SimpleAuth.Google.Droid. I'm using Xamarin Studio on macOS. |
Sorry, I upgraded it to VS 4 Mac, I may downgrade it again. Do you have VS 4 mac installed? |
We do not have VS 4 mac, and since we need to a custom command line build process, we're not in a hurry to make changes. |
It now builds on XS Again. |
Thanks but I don't see the change... last commit was May 25, and it does not build for me in XS. |
like a noob, I forgot to push the update Try again |
I'm still struggling with this. Now I see that your nugets are built with Xamarin.Android.Support.... 25.3.1 which are still in beta (you have to pick "Show pre-release packages" in Nuget). The current stable builds from Xamarin are 23.1.1. |
Ok, thanks. I will switch to the latest stable.
…--
James Clancey
On Wednesday, May 31, 2017 at 5:54 PM, Trevor Cox wrote:
I'm still struggling with this. Now I see that your nugets are built with Xamarin.Android.Support.... 25.3.1 which are still in beta (you have to pick "Show pre-release packages" in Nuget). The current stable builds from Xamarin are 23.1.1.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub (#30 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAPoLi6pOiqrsUXLjsWZ63ehoelUl8Tgks5r_eGCgaJpZM4Negb4).
|
Actually, 25.3.1 is the latest: https://www.nuget.org/packages/Xamarin.Android.Support.v4/25.3.1 and it is not preview. |
Yes, sorry! I may have been confused by a Xamarin Studio bug. |
I was also thinking about a way for you to avoid all this. If you remove the nuget for the Google Auth, just add the files to your project. And then it will build against any versions of the support lib you include! Google.cs and ActivityLifecycleManager.cs |
If you target API 23+ the app must prompt the user for GetAccounts permission:
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:
The text was updated successfully, but these errors were encountered: