3

I'm using GooglePlayServices location API and it's working fine. (All required permissions have been granted to the app.)

Everywhere I execute this piece of code:

LocationServices.FusedLocationApi.getLastLocation(googleApiClient);

I get the current location ... except for one case: When it's called from an onActivityResult hook, in this case it returns null.

Is this an expected behavior of the API? What am I missing?

NOTE

This is not a duplicate of this question. As I mentioned, this behavior only occurs when querying the location from an onActivityResult hook. Everything works like a charm everywhere else.

0 Answers0