Repository navigation
PAM Native 1.35.0
·
675 commits
to main
since this release
- Android
Location:current(),watch()and the newlastKnown()go
through the Google Play Services fused provider (FusedLocationProviderClient)
whenever Google Play Services is available, like React Native's
locationProvider: 'playServices'. The platformLocationManagerfailed with
"No enabled location provider" whenever its GPS/network providers were off
(battery-saving location modes, devices without a platform network provider)
even though Play Services' Wi-Fi/cell positioning could answer.highAccuracypicks
PRIORITY_HIGH_ACCURACYorPRIORITY_BALANCED_POWER_ACCURACY, and a fused
lastLocationat mostmaximumAgeMsold answers without a new request.
Without Play Services theLocationManagerpath is unchanged. The renderer
now depends oncom.google.android.gms:play-services-location:21.4.0. Location::lastKnown(Closure $callback, ?Closure $failure = null): the last
position the platform holds (fusedlastLocation, then the newest
LocationManagerprovider fix; iOSCLLocationManager.location) without
starting GPS. Fails withLocationError::Unavailablewhen there is none.- Location services (the system switch, not the permission):
Location::servicesEnabled(Closure(bool): void);
Location::requestServices(Closure(LocationServicesResult): void), which on
Android shows Play Services' "turn on location" dialog (SettingsClient) and
resolvesLocationServicesResult::Enabled(1) orDenied(2), or
Unavailable(3) when no dialog is possible (no Play Services, no activity,
iOS) so the app offers the settings screen; and
Location::openSettings(?Closure(bool): void $completed = null)
(ACTION_LOCATION_SOURCE_SETTINGS; iOS the app's Settings page). - Coded location failures: Android and iOS send
"<code>: <detail>"with code
permission,disabled,unavailableortimeout.$failurecallbacks
still receive that string;LocationError::fromFailure(string): LocationError
(Permission = 1, Disabled = 2, Unavailable = 3, Timeout = 4) returns the typed
reason, also for the bare English messages of older runtimes, and
LocationError::detail()strips the code. Location switched off is now
disabledon both platforms (iOS used to report it as a denied permission).
Apps show their own localized messages. - Android
Modal/BottomSheet: a closed modal keeps its Dialog mounted and
hidden (Dialog.hide()), and once the activity was stopped and restarted by
another activity (Play Services' "turn on location" dialog from
Location::requestServices, a share sheet, the camera) Android 12 showed
the hidden window's surface again as a fill-parent input target: no touch
reached the screen below until the user left it with Back. A hidden modal
window is nowFLAG_NOT_TOUCHABLEandFLAG_NOT_FOCUSABLE, cleared before
the same mounted modal is shown again. The host also tells a hidden Dialog
from a presented one by its decor visibility: older platforms (API 26) keep
Dialog.isShowingtrue afterhide(), so a reopened modal was never shown
again and a close notifiedonDismisstwice. - iOS: same contracts in
LocationModule.swift(uncompiled; Mac checklist in
docs/ios-parity.md).