草庐IT

mGoogleApiClient

全部标签

Android - 使用登录屏幕代替自动登录的 Google 登录

我已经在我的Android应用程序中添加了一个谷歌登录(步骤可以在这篇文章的第3部分找到)。一切正常,但我想做一些小的调整。使用在编辑3中找到的当前代码,您每次启动应用程序时都会自动登录,没有登录屏幕。我想禁用它,因为该应用程序将在工作中的平板电脑上使用,不同的员工应该每天登录该应用程序。我首先删除了mGoogleApiClient.connect();来自onStart()方法,现在我又有了Google登录按钮。当我添加mGoogleApiClient.connect();到signInWithGoogle()我可以使用记住的用户登录。我现在想要的是默认的谷歌登录屏幕,你可以在每次点

java - GoogleApiClient 登录失败

我正在尝试为我的Android游戏使用GoogleGames回合制Api。我用来连接GoogleApiClient的代码来自Google的Api示例或文档。在我的onConnectionFailed实现中,我尝试了两种不同的方法:if(signInClicked||autoStartSignInFlow){autoStartSignInFlow=false;signInClicked=false;resolvingConnectionFailure=true;//AttempttoresolvetheconnectionfailureusingBaseGameUtils.//TheR.

安卓模拟器 : This app won't run without Google Play services

从Android4.2.2开始,可以在Android模拟器上运行Google服务。我目前正在制作一个Android应用程序并制作了一个测试项目,看看我是否可以让Google+登录和退出工作。我遵循了以下教程:http://www.androidhive.info/2014/02/android-login-with-google-plus-account-1/使用以下教程/网站的额外信息:https://developers.google.com/+/mobile/android/getting-startedhttps://developers.google.com/+/mobile

安卓模拟器 : This app won't run without Google Play services

从Android4.2.2开始,可以在Android模拟器上运行Google服务。我目前正在制作一个Android应用程序并制作了一个测试项目,看看我是否可以让Google+登录和退出工作。我遵循了以下教程:http://www.androidhive.info/2014/02/android-login-with-google-plus-account-1/使用以下教程/网站的额外信息:https://developers.google.com/+/mobile/android/getting-startedhttps://developers.google.com/+/mobile

android - LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, 这个);尝试转换为 com.google.android.gms.location.LocationListener)

我已经在Android上设置了一个基于位置的map,但是当我尝试调用时:LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient,this);Androidstudio试图让我将其转换为LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient,(com.google.android.gms.location.LocationListener)this);然而,这会导致应用程序在调用时崩溃。我的应用有以下位置代码:

android - GoogleApiClient onConnectionSuspended ,我应该再次调用 mGoogleApiClient.connect() 吗?

我在服务中使用GoogleApiClient来请求融合位置更新。每件事都正常工作,但有时连接被暂停并调用onConnectionSuspended。@OverridepublicvoidonCreate(){...mGoogleApiClient=newGoogleApiClient.Builder(this)//thisisaContext.addApi(LocationServices.API).addConnectionCallbacks(this)//thisisa[GoogleApiClient.ConnectionCallbacks][1].addOnConnectionF

连接到 Google API 客户端时 Android 活动生命周期的奇怪行为

StrangebehaviourwithAndroidActivityLifecyclewhenconnectingtoGoogleAPIClient在文档中,它说onRestart(强调我的):CalledafteronStop()whenthecurrentactivityisbeingre-displayedtotheuser(theuserhasnavigatedbacktoit).ItwillbefollowedbyonStart()andthenonResume().现在在我的应用程序中,按照建议,我(尝试)在onStart中连接到\\'GoogleAPIClient\\',并在o

连接到 Google API 客户端时 Android 活动生命周期的奇怪行为

StrangebehaviourwithAndroidActivityLifecyclewhenconnectingtoGoogleAPIClient在文档中,它说onRestart(强调我的):CalledafteronStop()whenthecurrentactivityisbeingre-displayedtotheuser(theuserhasnavigatedbacktoit).ItwillbefollowedbyonStart()andthenonResume().现在在我的应用程序中,按照建议,我(尝试)在onStart中连接到\\'GoogleAPIClient\\',并在o