capacitor-background-geolocation icon indicating copy to clipboard operation
capacitor-background-geolocation copied to clipboard

When is 'event' equal to 'heartbeat' in the POST schema

Open svenbw opened this issue 8 months ago • 6 comments

In the documentation in the HTTP post schema (see https://transistorsoft.github.io/capacitor-background-geolocation/interfaces/location.html#http-post-schema) event can be set to motionchange, geofence or heartbeat.

However the onHeartbeat function handler will not post data itself when invoked by the plugin (https://transistorsoft.github.io/capacitor-background-geolocation/classes/backgroundgeolocation.html#onheartbeat). If an update must be sent to the server the getCurrentPosition function must be called. Since this is invoked from javascript the event will be missing.

Can anyone give details what the condition(s) are that will set event to heartbeat in the posted server data?

svenbw avatar Jun 25 '24 12:06 svenbw