location-client

onLocationChanged not called on some devices

廉价感情. 提交于 2019-11-29 06:11:53
问题 This is a question which has been asked numerous times but I could not find a solution that always works. I am developing an application using the Fused location provider. In the onConnected() method, I am requesting for location updates and the application logic will be initiated once a location fix is generated and onLocationChanged() is called. (Please refer to my code below). Problem onLocationChanged() method is never called on some devices. I use a Samsung Tab 2 and a Samsung Galaxy

Want to create google map navigation in my application - custom way

陌路散爱 提交于 2019-11-28 11:48:36
I have created an application in which I am trying to show user's movement by animating marker position. Using Google map V2. Location updates using location client. Animating marker using new location. But comparing with Google map navigation, there is no continuity in rendering navigation. Can anyone suggest a better approach? Thanks! Kapil For continuity, I think you need to fetch regular location updates from location client by giving location request like this. LocationRequest request = LocationRequest.create() .setInterval(0).setFastestInterval(0) .setSmallestDisplacement(0) .setPriority

Geofence triggering procedure explanation needed?

浪尽此生 提交于 2019-11-26 22:18:50
问题 SO I've created geofence as below: GeofenceModel modelExit = new GeofenceModel.Builder("id_oi_456") .setTransition(Geofence.GEOFENCE_TRANSITION_DWELL) .setExpiration(Geofence.NEVER_EXPIRE) .setLatitude(40.414341) .setLongitude(49.928548) .setRadius(CLIENT_GEOFENCE_RADIUS) .build(); SmartLocation.with(this).geofencing() .add(modelExit) .start(this); I run this code once, it triggers when dwelling inside geofence (as expected). And then I delete the snippet and rerun the project. But geofence

Do Geofences remain active in android after a device reboot

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 17:27:45
问题 I'm writing an application that needs to use geofencing for when someone enters/exits multiple sites over the lifetime of the application being installed. My implementation of geofencing (very similar to the second link below) is all working fine when I first install the application, both when moving in/out of the geofences and when using mock locations to simulate it, until a device is rebooted. On reboot neither mock locations nor actually physically moving in and out of a geofence appears