also looking at this
feat(android): getCurrentPosition in Zig — ratchet 52 → 51
#188
6 files
+466
-3
| @@ -1633,6 +1633,12 @@ class CraftBridge( | ||
| 1633 | 1633 | |
| 1634 | 1634 | @JavascriptInterface |
| 1635 | 1635 | 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 | ||
| 1636 | 1642 | if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_FINE_LOCATION) |
| 1637 | 1643 | != PackageManager.PERMISSION_GRANTED) { |
| 1638 | 1644 | ActivityCompat.requestPermissions( |