Skip to main content

mapzone_speed_alert 2.0.0 copy "mapzone_speed_alert: ^2.0.0" to clipboard
mapzone_speed_alert: ^2.0.0 copied to clipboard

MapZone Speed Alert SDK for Flutter: real-time speed-limit, camera, toll and road-restriction alerts with voice, for Android and iOS.

2.0.0 #

Native SDK 3.0.1: signed-in sessions. See the README section Migrating from 1.0.x to 2.0.0.

Breaking

  • AlertConfig.vehicleId → identity (who is signed in on this device). initialize signs it in; call it on every sign-in and every app launch.
  • AlertConfig.weight (int, kg) → weightTons (double, tonnes); configureVehicle(weight:) → configureVehicle(weightTons:).
  • VehicleType values are now the server's codes: car 1, taxi 2, bus 3, coach 4, truck 5, motorcycle 7. bicycle, pedestrian and emergency are removed. VehicleType.fromValue returns null for an unknown code instead of car.
  • initialize / configureVehicle throw PlatformException(INVALID_CONFIGURATION) with the SDK's reason when an input is rejected; nothing is applied and the previous configuration stays in effect, and the loaded zone and signs are left as they were. configureVehicle before initialize, or after logout, throws NOT_INITIALIZED.
  • Removed AlertResult.codeExpiredApiKey, isExpiredApiKey, codeInvalidParameter and isNetworkError: their codes changed meaning in the native SDK. Use MapZoneErrorCode.

Added

  • logout() → Future<AlertResult>: signs the identity out; zone fetches stop at once.
  • AlertConfig.metadata (Map<String, Object?>?), stored with the session.
  • onSnappedLocation stream + SnappedLocation: each matched fix on the road, with the road bearing. Computed natively only while listened to.
  • MapZoneErrorCode: every code of the native 3.0.1 table, including the session codes 2006, 2007, 2008, 2010, 3011, 3012, 4001, -6, -8.

Changed

  • Android native GPS capture (start()): Fused Location when Play Services is usable, otherwise the OS gps + network providers (network only while GPS is silent), instead of the gps provider alone — fixes now arrive indoors. Without a heading, or below 1 m/s, the last heading is kept instead of 0. Adds a dependency on play-services-location 21.3.0. iOS unchanged. start() now fails with NO_LOCATION_SERVICE when no source can start (was LOCATION_ERROR); a source lost after a successful start is reported on onResult as MapZoneErrorCode.locationUnavailable. Coordinates are logged only in debuggable builds.
  • Native GPS capture errors are reported on onResult with plugin codes -100 (locationUnavailable, both platforms) and -101 (locationPermissionDenied, iOS only) instead of -1, which is the native SDK's "response could not be verified". iOS no longer reports "Always authorization required for background location" while capture runs with when-in-use permission.
  • Example app: identity field and sign-out in the settings dialog, a "signed in elsewhere" dialog on 2006, weight in tonnes, the six vehicle types.

1.0.0 #

Native SDK upgrade and package rename. See the README section Migrating from mapzone_flutter_alert_plugin 0.0.x.

Breaking

  • Package renamed mapzone_flutter_alert_plugin → mapzone_speed_alert (import package:mapzone_speed_alert/mapzone_speed_alert.dart; iOS pod mapzone_speed_alert; Android package com.mapzone.mapzone_speed_alert; channel mapzone_speed_alert).
  • VietmapAlertController → MapZoneSpeedAlert, VietmapAlertPlatform → MapZoneSpeedAlertPlatform, MethodChannelVietmapAlert → MethodChannelMapZoneSpeedAlert.
  • Voice: the SDK now plays alerts through its built-in player. Listening to onVoice silences it and forwards every clip to Dart, as before; cancelling every subscription hands playback back to the SDK.
  • getLinkCoords is deprecated and always returns null (removed from the native SDK).

Added

  • onRestriction stream + RestrictionEvent: no stopping / parking, closed road, vehicle ban and built-up-area signs with distances (inBua while inside). A new listener receives the current state immediately.
  • VoiceAlertType.noStopping (19), roadClosed (20), vehicleRestricted (21).
  • setVoiceProfile(VoiceProfile.full | dingOnly) and setVoiceSpeed(double).
  • processExternalLocation(fixTimeMillis: …) — the fix's own timestamp, used by the engine for voice throttling and stop detection (defaults to the time of the call).

Changed

  • Native SDK: Android mapzone_speed_alert_android 2.0.6 (JitPack), iOS MapZoneSpeedAlertSDK 2.0.5 (CocoaPods).
  • initialize / configureVehicle reset and re-configure the native engine (no new Android manager; iOS rebuilds its thin manager so restriction signs are re-announced). Mute, voice profile and voice speed survive configureVehicle. Native callbacks are installed only by the Flutter engine that configures, so background engines no longer interfere.
  • A non-https baseUrl completes initialize / configureVehicle with PlatformException(CONFIGURE_FAILED) on both platforms.
  • Example app: restriction-sign row under the speed chip; the three new categories in the voice-mute sheet.

0.0.2 #

  • Docs / metadata only — no API or behaviour change.
  • Rebranded the package description, README and CHANGELOG to MapZone Speed Alert SDK; replaced the vietmap pub.dev topic with mapzone.

0.0.1 #

  • Initial release of mapzone_flutter_alert_plugin.
  • Wraps the MapZone Speed Alert SDK, resolved from the published native packages: Android com.github.mapzone-global:mapzone_speed_alert_android:2.0.1 (JitPack) and iOS MapZoneSpeedAlertSDK 2.0.1 (CocoaPods).
  • Two GPS modes: standalone (the plugin captures native GPS and drives the engine) and injected (feed snapped GPS via processExternalLocation() for navigation integration).
  • Event streams: onAlert (speed-limit / next-sign / camera / toll signs + distances + speed status), onVoice (WAV bytes + trigger + priority), onReady, onResult (errors), onLocation.
  • Sign images are delivered as PNG bytes with native change-detection caching.
  • Per-category voice muting: setMutedAlertTypes(List<VoiceAlertType>) + the VoiceAlertType enum, on both Android and iOS. Muting a camera / toll category also hides its on-screen sign; speed-limit and speeding cues can never be muted.
  • Utilities: updateZoneLocation(lat, lng) (zone warm-up) and getLinkCoords(linkId) (Android-only matched-link polyline).
  • AlertConfig reads the app's own bundle id / package name natively — no bundleId field to pass.
  • Example app: a single map screen with destination search (autocomplete / place v4), simulated navigation, a speed-limit / camera / toll sign HUD, a speed chip, per-category voice muting, and a vehicle-profile / simulation settings dialog.
1
likes
150
points
13
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

MapZone Speed Alert SDK for Flutter: real-time speed-limit, camera, toll and road-restriction alerts with voice, for Android and iOS.

Homepage
Repository (GitHub)
View/report issues

Topics

#speed-alert #navigation #mapzone #geolocation #adas

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on mapzone_speed_alert

Packages that implement mapzone_speed_alert