capacitor-community / capacitor-community/background-geolocation

I created a new fork with some additional parameters for Android

Open
#84 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
249
Forks
79
PR merge metrics
No merged PRs in 30d

Description

I only worked on the Android part because I am not testing IOS yet. But we should use
Deferring location updates
[let CLTimeIntervalMax: TimeInterval](https://developer.apple.com/documentation/corelocation/cltimeintervalmax)

the same way I am using interval for Android.

I added these parameters with these defaults. I used seconds instead of milliseconds for the first two, because who needs GPS updates in milliseconds? That said, if someone wants to get it working passing in Long be my guest. I could only get it working with Int parameters for some reason.
call.getInt("interval",61),// interval in seconds
call.getInt("maxWaitTime",0),// maxWaitTime in seconds
call.getInt("numUpdates",0) // how many updates before terminates 0 is infinite

also I noticed LocationRequest sets are all being replaced with LocationRequest.Builder sets. Someone should update the whole thing since it is deprecated.

My fork is at [https://github.com/alindzon/background-geolocation](url) with changes to
definitions.d.ts
as well as the android source files
BackgroundGeolocation.java
BackgroundGeolocationService.java

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.