ReviewOS

also looking at this

craft-native/craft

feat(android): getCurrentPosition in Zig — ratchet 52 → 51

#188
Merged glennmichael123 wants to merge feat/android-position into main
6 files +466 -3
packages/android/templates/CraftBridge.kt.templatemodified+6-0
Changes to packages/android/templates/CraftBridge.kt.template
@@ -1633,6 +1633,12 @@ class CraftBridge(
16331633
16341634 @JavascriptInterface
16351635 fun getCurrentPosition(optionsJson: String) {
1636 // The task listeners and the fresh-location callback are
1637 // CraftNative's, because they are Java interfaces. fusedLocationClient
1638 // below stays null, which is safe: watchPosition assigns it before
1639 // every use, so clearWatch is unaffected.
1640 if (CraftNative.getCurrentPosition(activity)) return
1641
16361642 if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION)
16371643 != PackageManager.PERMISSION_GRANTED) {
16381644 ActivityCompat.requestPermissions(