Questions tagged [android-googleapiclient]

169 questions
75
votes
9 answers

GoogleApiClient is throwing "GoogleApiClient is not connected yet" AFTER onConnected function getting called

So I found something that is not very clear for me about GoogleApiClient. GoogleApiClient has a function called onConnected which is run when the client is connected (for sure). I got my own function called: startLocationListening which is…
37
votes
7 answers

How to get access token after user is signed in from Gmail in Android?

I am following Google Sign in for Android. Now I can get the idToken but my back end server that I have used earlier is expecting access Token as I was using Google+ Login earlier. Now I don't want to alter my server side. But still how can I use…
12
votes
1 answer

How to take google maps snapshot without actually displaying the map

I want to be able to take a screenshot of a certain location in google maps without actually loading the google map onto the screen, If there is a way google map can take the screenshot in the background that would be great.
Errol Green
  • 1,297
  • 5
  • 17
  • 29
11
votes
2 answers

Where should the android service calls and calls to GoogleAPIClient be written while using MVP pattern in android?

I am trying to implement MVP pattern in my android project by referring to this link : https://github.com/jpotts18/android-mvp I have successfully implemented the view / presenter / interactor classes. I am not clear on Where to put the service…
8
votes
4 answers

GoogleApiClient onConnected not being called, using in a Service

Was working when I was using GoogleApiClient in an Activity but moved it to a Service and the onConnected is not being called. public class StepsMonitoringService extends Service implements GoogleApiClient.ConnectionCallbacks { private…
rukiman
  • 537
  • 6
  • 23
8
votes
5 answers

Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet

I am getting this error message when trying to implement logout for Google Sign-In for Android: Caused by: java.lang.IllegalStateException: GoogleApiClient is not connected yet. The crash occurs in DrawerActivity.java (below), where I call the…
VIN
  • 4,721
  • 5
  • 26
  • 58
7
votes
3 answers

GMail API Grant Permissions Before UserRecoverableAuthUIException

I've followed the quickstart example from Google to setup the GMail API: https://developers.google.com/gmail/api/quickstart/android My app successfully requests the GET_ACCOUNTS permission and allows the user to select his/her gmail account. The…
7
votes
1 answer

How do you provide a GoogleApiClient dependency with Dagger2?

I've started using Dagger2 to manage dependencies and I'm trying to understand how I can use DI to provide a singleton GoogleApiClient. The motivations for this are: reduce boilerplate code: multiple Activities & Fragments require a GoogleApiClient…
sidecarcat
  • 462
  • 5
  • 12
7
votes
2 answers

Check whether the user is already logged in using Auth.GoogleSignInApi?

I fount that in order to sign in the user I have to use this code: Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient); startActivityForResult(signInIntent, RC_SIGN_IN); to signout new ResultCallback() { …
7
votes
4 answers

SupportMapFragment.getMap() on a null object reference

After trying just about everything, I cannot seem to getmap without pulling a null object reference. I am trying to inflate a google mapfragment into a fragment, however each time I do so I always keep a getmap null object . Here is my code I'm…
Errol Green
  • 1,297
  • 5
  • 17
  • 29
6
votes
2 answers

How to get Places.GeoDataApi.getAutocompletePredictions ONLY inside the bounds?

I am using Places.GeoDataApi for Android and I get different search results depending on the location of the device performing the request. I need the results to be consistently located inside the bounds. I don't see where that could be setup in the…
5
votes
7 answers

statusCode=DEVELOPER_ERROR in google login

Below code I am using for Google login.I added google-services.json file in the app folder.I am using classpath 'com.google.gms:google-services:2.0.0' in root gradle module.I have checked my package at developer console and its correct and I added…
5
votes
6 answers

GoogleApiClient onConnectionFailed with statusCode=SIGN_IN_REQUIRED

I'm trying to connect my app to Google play service to access Google Drive but It showing me connection failed with statusCode SIGN_IN_REQUIRED. But it seems to behave like that just 3 days ago. I am also checked developer console of google. They…
5
votes
1 answer

Android: Google signin for a user without Google Play Services?

Is there a way of implementing Google signin that does not require Google Play Services? I'm aware that the official docs says that you need GPS: • https://developers.google.com/identity/sign-in/android/start-integrating however I also found…
4
votes
0 answers

Android - Activity Recognition best practices

In my Android application, I want to display a notification only when the user is not moving or only slowly moving. For example, when a user is driving, I don't want to display notifications. To accomplish this, I've looked into the Activity…
Christian
  • 2,844
  • 5
  • 27
  • 62
1
2 3
11 12