我是Android编程的新手。
我认为Google +在signIn到Google +时使用了Activity。我的项目在AndroidManifest.xml中没有活动注册,但Google plus活动运行良好。
为什么Google Plus无需注册就可以使用Acitivity?我有什么地方误解了吗?
发布于 2015-07-07 12:13:12
因为它是google play服务的一部分,如果您还记得的话,它将作为库添加。此外,如果您进一步查看实例化服务的代码,您将看到google api客户端是以这种方式调用的
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this).addApi(Plus.API, null)
.addScope(Plus.SCOPE_PLUS_LOGIN).build();这只是你的应用程序和play服务之间的一个层引用这个链接在这里有很好的解释https://developers.google.com/android/guides/api-client#Starting
https://stackoverflow.com/questions/31259384
复制相似问题