Skip to content

PAM Native 1.35.0

Choose a tag to compare

@DavidWilliamBalbino DavidWilliamBalbino released this 10 Oct 04:06
· 675 commits to main since this release
  • Android Location: current(), watch() and the new lastKnown() go
    through the Google Play Services fused provider (FusedLocationProviderClient)
    whenever Google Play Services is available, like React Native's
    locationProvider: 'playServices'. The platform LocationManager failed 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. highAccuracy picks
    PRIORITY_HIGH_ACCURACY or PRIORITY_BALANCED_POWER_ACCURACY, and a fused
    lastLocation at most maximumAgeMs old answers without a new request.
    Without Play Services the LocationManager path is unchanged. The renderer
    now depends on com.google.android.gms:play-services-location:21.4.0.
  • Location::lastKnown(Closure $callback, ?Closure $failure = null): the last
    position the platform holds (fused lastLocation, then the newest
    LocationManager provider fix; iOS CLLocationManager.location) without
    starting GPS. Fails with LocationError::Unavailable when 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
    resolves LocationServicesResult::Enabled (1) or Denied (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, unavailable or timeout. $failure callbacks
    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
    disabled on 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 now FLAG_NOT_TOUCHABLE and FLAG_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.isShowing true after hide(), so a reopened modal was never shown
    again and a close notified onDismiss twice.
  • iOS: same contracts in LocationModule.swift (uncompiled; Mac checklist in
    docs/ios-parity.md).