Questions tagged [android-googleapiclient]

169 questions
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
  • 3,239
  • 5
  • 38
  • 79
3
votes
1 answer

Caused by: Must include Drive.SCOPE_APPFOLDER to use snapshots

I have a game app in Google Play store. It implements Google's Saved Games feature. I haven't updated the app in months, and from one day to another, users massively started to report the same error: Caused by: Must include Drive.SCOPE_APPFOLDER to…
Adam Varhegyi
  • 11,307
  • 33
  • 124
  • 222
3
votes
2 answers

GoogleApiClient: hide GPS icon on status bar when a service is in the background

I'm using GoogleApiClient to implement a location listener service, but the GPS icon is always being displayed, even with the service in background. How to disable the GPS icon when the service is in the background? Follow the sources…
3
votes
1 answer

How to change google map api key from debug to release in android?

I have created an android app and generated a debug key for google maps api using debug sha certificate. Now I want to generate a key in release mode but android api manager in android developer console in not giving me an option to change the sha…
3
votes
2 answers

How to receive location updates every 5 minutes using the FusedLocation API

I am currently working on an app that has to check the user's location every five minutes and send the coordinates to a server. I decided to go with the FusedLocation API in Google Play Services instead of the plain old LocationManager API, mainly…
3
votes
2 answers

Cannot use LocationCallback class

I want to override onLocationAvailability() from LocationCallback class (com.google.android.gms.location.LocationCallback). According to this doc, LocationCallback is an abstract class. So I tried extending it, but I can't, nothing shows up in…
rgv
  • 1,186
  • 1
  • 17
  • 39
3
votes
1 answer

GoogleApiClient.Builder.enableAutoManage in Fragment throws IllegalStateException: Recursive entry to executePendingTransactions

I have an AppCompatActivity that has 3 tabs using FragmentTabHost. One of the tabs uses LocationServices. I would like to have the smoothest possible user experience: If the LocationService is off in the android system, and only if the user chooses…
3
votes
0 answers

How to get google drive account name

I am using Google Drive core API for file CRUD. All things are working fine but I am unable to get Google Drive account name in onActivityResult() method. My code is as follows: In onCreate(): String[] accountTypes = new String[]{"com.google"}; …
3
votes
1 answer

GoogleApiClient gives a nullpointer even when a context is passed to it while using Fused Location API in android

I am trying to implement Fused Location API in a service. I have done the following coding but I am getting an error as follows: java.lang.RuntimeException: Unable to instantiate service com.locate.LocationDetails: java.lang.NullPointerException:…
2
votes
1 answer

Android Safetynet Attestation built-in retry logic

My question is what retry logic does Google Safetynet have built-in, and what retry logic should be build in the application? What is the best-practice for building the application level logic? I use Safetynet Attestation in Android application and…
2
votes
0 answers

Google Signin working in release apk but not on play store?

I have this very annoyiing issue in my app. Firstly it was not working in the release apk, so I added another fingerprint in Firebase(from SHA-1 finferprint in Release Management of my app in play console), but now that it has been successfully…
2
votes
1 answer

geofencing dwell event never received when adding geofence with device within the radius

I made a simple test app, setup location and geofencing monitoring using LocationServices.getFusedLocationProviderClient and LocationServices.getGeofencingClient. I added a geofence using just the dwell transition notification and initial trigger,…
2
votes
4 answers

How to check if a user has logged in with Google Account

I am integrating Facebook and Google authentication in my android application. While launching the application, I want to check if a user is logged on to the app with Facebook or Google authentication. I got success with Facebook using the below…
2
votes
1 answer

How to set the labels for source and destination in google maps programmatically in android?

I am using this code to open the Google Maps app in android. if(source != null && destination != null) { Intent intent = new Intent(android.content.Intent.ACTION_VIEW, …
Aman Kush
  • 91
  • 2
  • 11
2
votes
0 answers

GoogleApiClient out of the Activity context

I want to create the only one instance of mGoogleApiClient for all the application and want to use enableAutoManage method or handle onConnectionFailed call backs out of the activity context, for example in the sevice. But the enableAutoManage…
1
2
3
11 12