来自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
原文地址:https://www.jb51.cc/csharp/93122.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。