GameActivity, location, events #1932
Replies: 2 comments
-
Yeah, we don't know. You'd need to ask the folks that made https://issuetracker.google.com/issues?q=status:open%20componentid:897320 looks to be the buganizer component for the games sdk. For |
Beta Was this translation helpful? Give feedback.
-
I'm going to post, just in case someone searches, preferably using a search service which doesn't track you, like duck duck go. Don't use locationManager = getSystemService(Context.LOCATION_SERVICE) It doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Is there anything with the NDK looper + GameActivity that could cause location events to be dropped?
I am using the NDK with a GameActivity.
I'm using HelloVK as the starting point.
I have incorporated location updates by:
where provide is GPS given by
locationManager.getBestProvider(criteria, true);
locationManager is a
locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager
user permission for FINE and COARSE locations are in the manifest. Everything works. No exceptions thrown.
Except-> no location updates are passed into the location locationListener.
I can see in the logcat things like:
and I can see when it is activated:
Is there some peculiarity with the looper and events and GameActivity that might cause those events to be "dropped" or "consumed" before they get to the LocationListener?
The game activity loop looks like this:
Thanks.
Yes I know this might very well not be an NDK problem, but I want to check - because everything seems fine.
Beta Was this translation helpful? Give feedback.
All reactions