来自bellow链接的代码:
http://motzcod.es/post/67077106339/google-plus-services-login-and-1-in-xamarin-android
它显示错误连接失败,[GooglePlayServicesUtil] Google Play商店丢失.
甚至添加谷歌播放服务(Froyo)组件.
即使我经历了波纹管链接
https://developers.google.com/+/mobile/android/sign-in
Android: Login using google account?
但这是关于android eclipse使用java代码的.
有人可以建议我如何在xamarin这样做.任何提示/链接都不胜感激.
谢谢.
解决方法
我使用了OAuth2Authenticator
>在google开发者控制台中注册为web应用程序而不是安装的应用程序(android)*提供带有有效url(“http://abcd.com/xyz.aspx”)的重定向网址,应该在应用程序代码中使用.
>验证完成后将返回access_token
>通过使用access_token使REST请求获得用户完整的信息(https://www.googleapis.com/oauth2/v1/userinfo?access_token=“accesstokenValue”.)
>反序列化json响应以获取对象中的信息.
*If we registered in developer console as installed application(like
android) after making OAuth2Authenticator request it will show window
with message please copy this code switch to your application and
paste it there [code] manually need to close the window and proceed
to authentication. to get ride of this webapplication type is choosen.
参考更多信息. :Login by google account integration for Xamarin.Android and Xamarin.iOS