Skip to content

v1.9.0 — Typed Permission APIs + Critical Bug Fixes

Choose a tag to compare

@GalacticTitan GalacticTitan released this 20 Apr 15:58
· 3002 commits to main since this release
v1.9.0
26f5038

Tracelet 1.9.0 — Typed Permission APIs + Critical Bug Fixes

Highlights: typed AuthorizationStatus permission APIs (#57), fix for missing
geofence extras in callback (#58), and fix for RemoteServiceException
foreground-service crash (#59). Bundled into a single coordinated release.

Highlights

Typed Permission APIs (#57)

Seven new *Authorization methods on Tracelet return the typed
AuthorizationStatus enum instead of an int:

  • getLocationAuthorization()
  • requestLocationAuthorization()
  • getNotificationAuthorization()
  • requestNotificationAuthorization()
  • getMotionAuthorization()
  • requestMotionAuthorization()
  • requestTemporaryFullAccuracyAuthorization(purpose)

The previous int-returning methods are kept and marked @Deprecated. They
will be removed in 2.0.0. Existing code keeps compiling.

// Before
final status = await Tracelet.getPermissionStatus();
if (status == 4) { /* deniedForever */ }

// After
final status = await Tracelet.getLocationAuthorization();
if (status == AuthorizationStatus.deniedForever) { /* clearer + type-safe */ }

Geofence Extras Restored (#58)

Geofence callbacks now correctly receive the extras map and polygon
vertices array on Android. Affected code paths that read custom metadata
via event.geofence.extras will work again.

Foreground Service Crash Fixed (#59)

LocationService.onStartCommand now always promotes the service to
foreground, including for ACTION_STOP, ACTION_UPDATE_NOTIFICATION,
ACTION_BUTTON, and the null-intent START_STICKY restart path.

This eliminates the RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground() crash that was easily reproducible
when using periodicUseForegroundService: true. Device-verified on a LAVA
LXX503 — no RemoteServiceException, no ANR.

Versions

Package Old New
tracelet 1.8.14 1.9.0
tracelet_platform_interface 1.8.14 1.9.0
tracelet_android 1.8.14 1.9.0
tracelet_ios 1.8.14 1.9.0
tracelet_web 1.8.14 1.9.0
Native tracelet-sdk (Android) 1.0.13 1.1.0
Native TraceletSDK (iOS) 1.0.11 unchanged

Documentation

  • help/PERMISSIONS.md restructured around the typed API; new
    AuthorizationStatus enum table replaces the old int-code table.
  • help/API.md, BACKGROUND-TRACKING.md, INSTALL-ANDROID.md,
    INSTALL-IOS.md, HEALTH-CHECK.md, PLAY-STORE-DECLARATION.md,
    WEB-SUPPORT.md, and MIGRATION-FROM-FBG.md migrated to the new method
    names and enum.
  • The example app (example/lib/main.dart) fully migrated as a reference
    implementation.

Validation

  • melos exec dart format: clean
  • melos run analyze: SUCCESS, no issues across all 5 packages + example
  • tracelet: 462/462 tests pass (12 tests added for #57)
  • tracelet_platform_interface: 338/338 tests pass
  • tracelet_web: 29/29 tests pass
  • tracelet_android Robolectric: BUILD SUCCESSFUL
  • #59 device-verified on LAVA LXX503

Migration Guide

No code changes required — old methods still compile with a deprecation
warning. To migrate, see help/PERMISSIONS.md.

Full Changelog: c3c4df2...v1.9.0