WIP: [Android] Speed limit exceed check improvements #9167
Draft
strump
wants to merge 8 commits from
android/speed-limit-exceed-flag
into master
pull from: android/speed-limit-exceed-flag
merge into: organicmaps:master
organicmaps:master
organicmaps:weblate-i18n
organicmaps:beta/ios-hotfix-search
organicmaps:ios/search-fix-to-child-vc
organicmaps:ios/update-toast-ui
organicmaps:pastk-generator-genorder
organicmaps:pastk-autogen-subways
organicmaps:ios/pp-for-track-recording
organicmaps:ios/add-icons-to-the-live-activity-widget
organicmaps:ios/fix-search-on-map-tests-for-ipad
organicmaps:release/2025.03.02
organicmaps:pastk-drape-subways-greying-out
organicmaps:ios/update-search-vc-ui
organicmaps:alpha/2025.02.23
organicmaps:crowdin-master
organicmaps:l10n
organicmaps:ios/search-ui-redesign
organicmaps:ios/show-new-search-vc-from-the-route-building
organicmaps:release/2025.01.24
organicmaps:drop-appstream-glib
organicmaps:separate-locationservice-lib
organicmaps:release/2025.01.12
organicmaps:int/anrdoid-auto/permissions-screen
organicmaps:rt-docs-release-management-principles
organicmaps:generator-wikipedia
organicmaps:generator-actions
organicmaps:generator-subways
organicmaps:ios/enable-cpp-swift-interop
organicmaps:pastk-docs-values
organicmaps:fix-deprecated-atomic-load
organicmaps:rt-docs-communication
organicmaps:rt-docs-collaboration
organicmaps:ios/fix-compile-warnings-and-cleanup-unsupported-code
organicmaps:rt-ios-managed-signing
organicmaps:ios/fix-ios-test-ci-action-failure
organicmaps:ab-ios-bookmarks-last-category
organicmaps:pastk-docs-teams
organicmaps:qt-3d-preferences
organicmaps:fix-file-read-exception
organicmaps:fix-track-length-calculation
organicmaps:pastk-styles-feature-types-migration
organicmaps:release/24.11.27
organicmaps:alpha/2024.11.26
organicmaps:beta/2024.11.26
organicmaps:ab-tests-macro-fixes
organicmaps:ios/track-recording-fifth-bar-button
organicmaps:vng-fix
organicmaps:release/24.11.12
organicmaps:alpha/2024.11.10
organicmaps:vng-langs
organicmaps:patch-3
organicmaps:release/2024.10.22
organicmaps:alpha/2024.10.22
organicmaps:beta/2024.10.22
organicmaps:place-page-for-tracks-backup
organicmaps:release/2024.10.08
organicmaps:release/2024.10.04
organicmaps:alpha/2024.10.01
organicmaps:vng-search
organicmaps:beta/2024.09.19
organicmaps:release/2024.09.19
organicmaps:rdb-weblate
organicmaps:release/2024.09.08
organicmaps:alpha/2024.09.03
organicmaps:alpha/2024.09.03-ios-track-recording-feature
organicmaps:mb-PendingIntent-requestCode-fix
organicmaps:alpha/2024.08.29
organicmaps:add-timestamps-to-track
organicmaps:ab-ios-crash-on-assert
organicmaps:alpha/2024.08.25-ios-track-recording-feature
organicmaps:alpha/2024.08.29-ios-track-recording-feature
organicmaps:android/speed-limit-threshold
organicmaps:android-oauth2-with-browser
organicmaps:release/2024.08.17
organicmaps:changes-from-release
organicmaps:release/2024.08.15
organicmaps:alpha-iOS-Bluetooth
organicmaps:rdb-cldr-plural-order
organicmaps:ab-unused-code
organicmaps:ab-android-location-fix
organicmaps:recent-track-recorder
organicmaps:ab-cleaner-shutdown
organicmaps:localized_address_ordering
organicmaps:ab-android-layer-button-highlight
organicmaps:weblate
organicmaps:release/2024.07.08
organicmaps:alpha/2024.07.25-rtsisyk-ios-test
organicmaps:ios-implement-the-recently-deleted-support-to-icloud-sync
organicmaps:recently-deleted-categories-using-postfix
organicmaps:fix-ios-simulator-version
organicmaps:alpha/2024.07.02
organicmaps:vng-test-data
organicmaps:release/2024.06.02
organicmaps:ios/undo-for-the-bookmark-deletion
organicmaps:ios/restore-bookmark-by-tap-on-the-map
organicmaps:ios/undo-for-the-bookmark-deletion-with-restoring-by-tap-on-the-map
organicmaps:revert-7969-pastk-drape-transparent-areas
organicmaps:ab-drape-use-constant-base-font-height
organicmaps:rt-beta
organicmaps:vng-alt-routes
organicmaps:pastk-styles-shared-paths-tune-down
organicmaps:android-auto/8015-8019-8022
organicmaps:pastk-beta-0420
organicmaps:pastk-2generate-paths
organicmaps:ab-fix-shaders-rebuild
organicmaps:ios/fix-drape-failure-during-test-running
organicmaps:ios/add-test-target-terminate
organicmaps:cleanup/base
organicmaps:ab-max-open-file-limit
organicmaps:weblate-appstore-i18n
organicmaps:2024.03.27-3-android-hotfix
organicmaps:ab-3party-oauthcpp
organicmaps:android-hotfix-24031805
organicmaps:ab-android-revert-links
organicmaps:ab-tts-simpler-strings
organicmaps:rt-android-huawei-crash
organicmaps:rt-android-release-2024.03.02
organicmaps:rt-android-release-2024.03.01
organicmaps:ab-ios-release-2024.02.27
organicmaps:ab-from-chars
organicmaps:gplay-android-auto-hotfix
organicmaps:ab-case-folding
organicmaps:rt-store-metadata
organicmaps:ab-buffer-vector-string-view
organicmaps:ab-update-gh-cache-action
organicmaps:rt-android-bookmark-export
organicmaps:osm-oauth2-support
organicmaps:vng-test
organicmaps:rt-geo-links
organicmaps:vng-lines
organicmaps:windows3
organicmaps:android-auto-disable
organicmaps:rt-android-paranoid-mode
organicmaps:rt-android-outdoor
organicmaps:ios-hotfix-release-dec-2023
organicmaps:rt-android-location-providers
organicmaps:pastk-outdoors-hiking-routes
organicmaps:pastk-2generate
organicmaps:pastk-classif-hiking-routes
organicmaps:vng-gen-kk
organicmaps:poc-disable-route-build-zoom
organicmaps:kk2
organicmaps:ab-thread-checker-qt-download-dialog-fix
organicmaps:revert-6461-category-letterbox-it
organicmaps:beta-outdoor
organicmaps:protobuf-24.4
organicmaps:designer-fixes
organicmaps:vng-bookmarks
organicmaps:vng-outdoors
organicmaps:navigation/save-mode
organicmaps:pastk-TEST-rel-w-lines-stats
organicmaps:ab-kml-remove-unique-ptr
organicmaps:vng-bench
organicmaps:aa
organicmaps:rt-android-remove-workmanager
organicmaps:rt-android-debug
organicmaps:protobuf-24.3
organicmaps:pastk-core-housenumbers
organicmaps:ruler-disable-reordering
organicmaps:android-warning-suppress
organicmaps:pastk-drape-bucket-discard-optimization
organicmaps:beta-ios-gpx-fix
organicmaps:pastk-generator-isolines-skip-resimplify
organicmaps:pastk-styles-world-railways
organicmaps:pastk-styles-TMP_dump_priorities
organicmaps:ab-increase-long-tap-radius
organicmaps:car-checkpoint-tolerance
organicmaps:rt-android-fix-viewport
organicmaps:vng-addr-test
organicmaps:downloader
organicmaps:obsolete-position-color
organicmaps:pastk-styles-geometryfallback
organicmaps:pastk-DEMO-geometry-1more-detailed
organicmaps:strings-be-ru-uk-miles
organicmaps:ios/external-keyboard-fix2
organicmaps:alex-outdoors
organicmaps:ios/blue-route-to
organicmaps:pastk-styles-fixpriorities2
organicmaps:pastk-styles-fixpriorities
organicmaps:rt-android-accent-color
organicmaps:pastk-drape-path_text_zoom_mask
organicmaps:pastk-drape-roadshields
organicmaps:update-appstore-metadata
organicmaps:pastk-styles-outdoors
organicmaps:3p/disable-system-jansson
organicmaps:ios/newly-created-list-order
organicmaps:czech-release
organicmaps:rt-fix-monkey-gh
organicmaps:ios/fix-tableview-headers-font
organicmaps:rt-android-google-location-annoying
organicmaps:pastk-loc-share
organicmaps:ctest
organicmaps:windows2
organicmaps:kml-load-robust
organicmaps:tr-screenshots
organicmaps:vng-nav
organicmaps:d4f5409d-patch-1
organicmaps:rt-fix-location-resolution
organicmaps:github-actions-update
organicmaps:android_auto
organicmaps:matheusgomesms-store-releasenotes-pt_BRtranslation
organicmaps:rt-add-ci-timeout
organicmaps:rq-alterRoutes-vng
organicmaps:euskara
organicmaps:windows
organicmaps:tests-fix
organicmaps:pastk-styles-geometryfallback-1more-detailed
organicmaps:pastk-styles-zoomlessareas
organicmaps:pastk-outdoors-beta
organicmaps:android/R8
organicmaps:pastk-android-writability
organicmaps:rt-location-api
organicmaps:pastk-android-verifyerror
organicmaps:qt6
organicmaps:vng-my_pos
organicmaps:pastk-scripts
organicmaps:vng-sdfimage
organicmaps:vng-vehicle-refactoring
organicmaps:release-gp-fdroid-without-location-fixes
organicmaps:rt-android-track-recorder
organicmaps:rt-android-gplay-compliance
organicmaps:rt-android-remove-gms
organicmaps:rt-android-track-recorder-alarm
organicmaps:rt-android-keep-data
organicmaps:fix-odr
organicmaps:build/no-unity
organicmaps:backup-resources
organicmaps:android/warning-fixes
organicmaps:weblate-ios-i18n
organicmaps:rt-android-symlinks
organicmaps:weblate-android-i18n
organicmaps:weblate-whitespacing
organicmaps:rt-weblate-consume
organicmaps:ios/fixes
organicmaps:i18n-android
organicmaps:i18n-ios
organicmaps:rt-xcode-desktop
No reviewers
Labels
Clear labels
issues affecting users with specific needs
issues affecting users with specific needs
Issues with addresses, post codes, city/town/village borders
Issues with addresses, post codes, city/town/village borders
Android development
Android development
Android Auto
Android Auto
Short Links, deep links and url schemes, including ge0 and om://
Short Links, deep links and url schemes, including ge0 and om://
Huawei AppGallery
Huawei AppGallery
Apple AppStore
Apple AppStore
Performance and battery consumption-related issues and optimizations
Performance and battery consumption-related issues and optimizations
An issue blocking the release
An issue blocking the release
Bookmarks, imported tracks, and KML, KMZ, KMB, GPX, GPZ import or export
Bookmarks, imported tracks, and KML, KMZ, KMB, GPX, GPZ import or export
Country borders and polygons
Country borders and polygons
Something isn't working
Something isn't working
Compilation issue
Compilation issue
CarPlay Integration
CarPlay Integration
Classify object by types
Classify object by types
Community relations
Community relations
Cross-platform C++ libraries with a core functionality
Cross-platform C++ libraries with a core functionality
Crash Reporting
Crash Reporting
Bike, cycle, biking and related
Bike, cycle, biking and related
Desktop application
Desktop application
Developer Experience
Developer Experience
Automation and pipelines
Automation and pipelines
A desktop app to debug rendering
A desktop app to debug rendering
Issues with next turns, labels, streets, voice instructions
Issues with next turns, labels, streets, voice instructions
Improvements or additions to documentation
Improvements or additions to documentation
Map dowloader
Map dowloader
Drape OpenGL, Vulkan and Metal graphics rendering engine
Drape OpenGL, Vulkan and Metal graphics rendering engine
Drive a car related issues
Drive a car related issues
This issue or pull request already exists
This issue or pull request already exists
OSM Editor
OSM Editor
Isolines and altitude
Isolines and altitude
New feature or request, an improvement of some existing feature
New feature or request, an improvement of some existing feature
A large body work
A large body work
TIGER, Ordnance Survey, ASTER, SRTM, etc.
TIGER, Ordnance Survey, ASTER, SRTM, etc.
F-Droid build and distribution
F-Droid build and distribution
Font and text rendering
Font and text rendering
Most annoying UX and other issues for users reported by many people
Most annoying UX and other issues for users reported by many people
Related to generator tool.
Related to generator tool.
Good for newcomers
Good for newcomers
Google Play
Google Play
Location and positioning issues
Location and positioning issues
Ideas for Google Summer of Code
Ideas for Google Summer of Code
Map and app icons
Map and app icons
iOS development
iOS development
Legal aspects
Legal aspects
Ubuntu, Gentoo, Red Hat, Debian, Cent OS, Fedora, etc.
Ubuntu, Gentoo, Red Hat, Debian, Cent OS, Fedora, etc.
LibreM, PinePhone, Wayland and other mobile Linux versions
LibreM, PinePhone, Wayland and other mobile Linux versions
Desktop issues related to Mac OS X, OM running on M1, M2, M3 Apple silicon, or Qt version
Desktop issues related to Mac OS X, OM running on M1, M2, M3 Apple silicon, or Qt version
OpenStreetMap data related issues
OpenStreetMap data related issues
Subway, Tube, light-rail public transport issues
Subway, Tube, light-rail public transport issues
Issues related to the active Navigator / Navigation mode
Issues related to the active Navigator / Navigation mode
Further information is requested
Further information is requested
Night or dark mode feature
Night or dark mode feature
Tasks related to NLnet 2024-06-281 project.
Tasks related to NLnet 2024-06-281 project.
A platform needs this to be implemented to have feature parity with other platforms
A platform needs this to be implemented to have feature parity with other platforms
Business Hours, off time, holidays, seasonal
Business Hours, off time, holidays, seasonal
Hiking, mtb, 4x4...
Hiking, mtb, 4x4...
Feature metadata, OSM tags that are displayed in Place Page
Feature metadata, OSM tags that are displayed in Place Page
Privacy
Privacy
Bus, trolleybus, train, tram, metro, subway, light rail
Bus, trolleybus, train, tram, metro, subway, light rail
An idea that needs to be elaborated
An idea that needs to be elaborated
This issue is different depending on the country or region
This issue is different depending on the country or region
A regression bug
A regression bug
Meta-tickets for tracking the release procedure
Meta-tickets for tracking the release procedure
Robo / Monkey Auto Tests
Robo / Monkey Auto Tests
Preview and plan your track
Preview and plan your track
Route building issues, e.g. valid route, valid ETA
Route building issues, e.g. valid route, valid ETA
Helicopter routing, "as a crow flies"
Helicopter routing, "as a crow flies"
Search
Search
Security improvements
Security improvements
Map drawing styles
Map drawing styles
Track Recording
Track Recording
Localization and translations issues
Localization and translations issues
Text-to-Speech
Text-to-Speech
User interface issues
User interface issues
User eXperience, an issue with usability
User eXperience, an issue with usability
Foot pedestrian mode
Foot pedestrian mode
Android Watches or Apple Watches support
Android Watches or Apple Watches support
https://organicmaps.app/
https://organicmaps.app/
Issues related to Wiki articles embedded in OM data files.
Issues related to Wiki articles embedded in OM data files.
Windows
Windows
Unfeasible or impossible to resolve
Unfeasible or impossible to resolve
Issues about improving the base map of the whole world that is bundled with the app
Issues about improving the base map of the whole world that is bundled with the app
Accessibility
issues affecting users with specific needs
Accessibility
issues affecting users with specific needs
Address
Issues with addresses, post codes, city/town/village borders
Address
Issues with addresses, post codes, city/town/village borders
Android
Android development
Android
Android development
Android Auto
Android Auto
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
Short Links, deep links and url schemes, including ge0 and om://
API
Short Links, deep links and url schemes, including ge0 and om://
AppGallery
Huawei AppGallery
AppGallery
Huawei AppGallery
AppStore
Apple AppStore
AppStore
Apple AppStore
Battery and Performance
Performance and battery consumption-related issues and optimizations
Battery and Performance
Performance and battery consumption-related issues and optimizations
Blocker
An issue blocking the release
Blocker
An issue blocking the release
Bookmarks and Tracks
Bookmarks, imported tracks, and KML, KMZ, KMB, GPX, GPZ import or export
Bookmarks and Tracks
Bookmarks, imported tracks, and KML, KMZ, KMB, GPX, GPZ import or export
Borders
Country borders and polygons
Borders
Country borders and polygons
Bug
Something isn't working
Bug
Something isn't working
Build
Compilation issue
Build
Compilation issue
CarPlay
CarPlay Integration
CarPlay
CarPlay Integration
Classificator
Classify object by types
Classificator
Classify object by types
Community
Community relations
Community
Community relations
Core
Cross-platform C++ libraries with a core functionality
Core
Cross-platform C++ libraries with a core functionality
CrashReports
Crash Reporting
CrashReports
Crash Reporting
Cycling
Bike, cycle, biking and related
Cycling
Bike, cycle, biking and related
Desktop
Desktop application
Desktop
Desktop application
DevEx
Developer Experience
DevEx
Developer Experience
DevOps
Automation and pipelines
DevOps
Automation and pipelines
dev_sandbox
A desktop app to debug rendering
dev_sandbox
A desktop app to debug rendering
Directions
Issues with next turns, labels, streets, voice instructions
Directions
Issues with next turns, labels, streets, voice instructions
Documentation
Improvements or additions to documentation
Documentation
Improvements or additions to documentation
Downloader
Map dowloader
Downloader
Map dowloader
Drape
Drape OpenGL, Vulkan and Metal graphics rendering engine
Drape
Drape OpenGL, Vulkan and Metal graphics rendering engine
Driving
Drive a car related issues
Driving
Drive a car related issues
Duplicate
This issue or pull request already exists
Duplicate
This issue or pull request already exists
Editor
OSM Editor
Editor
OSM Editor
Elevation
Isolines and altitude
Elevation
Isolines and altitude
Enhancement
New feature or request, an improvement of some existing feature
Enhancement
New feature or request, an improvement of some existing feature
Epic
A large body work
Epic
A large body work
External Map Datasets
TIGER, Ordnance Survey, ASTER, SRTM, etc.
External Map Datasets
TIGER, Ordnance Survey, ASTER, SRTM, etc.
F-Droid
F-Droid build and distribution
F-Droid
F-Droid build and distribution
Fonts
Font and text rendering
Fonts
Font and text rendering
Frequently User Reported
Most annoying UX and other issues for users reported by many people
Frequently User Reported
Most annoying UX and other issues for users reported by many people
Fund
Fund
Generator
Related to generator tool.
Generator
Related to generator tool.
Good first issue
Good for newcomers
Good first issue
Good for newcomers
Google Play
Google Play
Google Play
Google Play
GPS
Location and positioning issues
GPS
Location and positioning issues
GSoC
Ideas for Google Summer of Code
GSoC
Ideas for Google Summer of Code
iCloud
iCloud
Icons
Map and app icons
Icons
Map and app icons
iOS
iOS development
iOS
iOS development
Legal
Legal aspects
Legal
Legal aspects
Linux Desktop
Ubuntu, Gentoo, Red Hat, Debian, Cent OS, Fedora, etc.
Linux Desktop
Ubuntu, Gentoo, Red Hat, Debian, Cent OS, Fedora, etc.
Linux packaging
Linux packaging
Linux Phone
LibreM, PinePhone, Wayland and other mobile Linux versions
Linux Phone
LibreM, PinePhone, Wayland and other mobile Linux versions
Mac OS
Desktop issues related to Mac OS X, OM running on M1, M2, M3 Apple silicon, or Qt version
Mac OS
Desktop issues related to Mac OS X, OM running on M1, M2, M3 Apple silicon, or Qt version
Map Data
OpenStreetMap data related issues
Map Data
OpenStreetMap data related issues
Metro
Subway, Tube, light-rail public transport issues
Metro
Subway, Tube, light-rail public transport issues
Navigation
Issues related to the active Navigator / Navigation mode
Navigation
Issues related to the active Navigator / Navigation mode
Need Feedback
Further information is requested
Need Feedback
Further information is requested
Night Mode
Night or dark mode feature
Night Mode
Night or dark mode feature
NLnet 2024-06-281
Tasks related to NLnet 2024-06-281 project.
NLnet 2024-06-281
Tasks related to NLnet 2024-06-281 project.
No Feature Parity
A platform needs this to be implemented to have feature parity with other platforms
No Feature Parity
A platform needs this to be implemented to have feature parity with other platforms
Opening Hours
Business Hours, off time, holidays, seasonal
Opening Hours
Business Hours, off time, holidays, seasonal
Outdoors
Hiking, mtb, 4x4...
Outdoors
Hiking, mtb, 4x4...
POI Info
Feature metadata, OSM tags that are displayed in Place Page
POI Info
Feature metadata, OSM tags that are displayed in Place Page
Privacy
Privacy
Privacy
Privacy
Public Transport
Bus, trolleybus, train, tram, metro, subway, light rail
Public Transport
Bus, trolleybus, train, tram, metro, subway, light rail
Raw Idea
An idea that needs to be elaborated
Raw Idea
An idea that needs to be elaborated
Refactoring
Refactoring
Regional
This issue is different depending on the country or region
Regional
This issue is different depending on the country or region
Regression
A regression bug
Regression
A regression bug
Releases
Meta-tickets for tracking the release procedure
Releases
Meta-tickets for tracking the release procedure
RoboTest
Robo / Monkey Auto Tests
RoboTest
Robo / Monkey Auto Tests
Route Planning
Preview and plan your track
Route Planning
Preview and plan your track
Routing
Route building issues, e.g. valid route, valid ETA
Routing
Route building issues, e.g. valid route, valid ETA
Ruler
Helicopter routing, "as a crow flies"
Ruler
Helicopter routing, "as a crow flies"
Search
Search
Search
Search
Security
Security improvements
Security
Security improvements
Styles
Map drawing styles
Styles
Map drawing styles
Tests
Tests
Track Recording
Track Recording
Track Recording
Track Recording
Translations
Localization and translations issues
Translations
Localization and translations issues
TTS
Text-to-Speech
TTS
Text-to-Speech
UI
User interface issues
UI
User interface issues
UX
User eXperience, an issue with usability
UX
User eXperience, an issue with usability
Walk Navigation
Foot pedestrian mode
Walk Navigation
Foot pedestrian mode
Watches
Android Watches or Apple Watches support
Watches
Android Watches or Apple Watches support
Web
https://organicmaps.app/
Web
https://organicmaps.app/
Wikipedia
Issues related to Wiki articles embedded in OM data files.
Wikipedia
Issues related to Wiki articles embedded in OM data files.
Windows
Windows
Windows
Windows
Won't fix
Unfeasible or impossible to resolve
Won't fix
Unfeasible or impossible to resolve
World Map
Issues about improving the base map of the whole world that is bundled with the app
World Map
Issues about improving the base map of the whole world that is bundled with the app
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#9167
Reference in a new issue
No description provided.
Delete branch "android/speed-limit-exceed-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #8934.
Alternative implementation of #9150 .
What problem do I try to resolve?
Android UI (
NavMenu
class) needs to show current speed and speed limit in local units ("km/h" or "mi/h"). Current implementation usesapp.organicmaps.util.StringUtils.nativeFormatSpeedAndUnits(speedMps)
for current speed and for speed limit. These JNI calls could be slow when invoked on every location update (once per second). Also to indicate speedometer red when speed is greater than speed limit UI code should have speed values in "km/h" or "mi/h" units (another JNI call?).What is done
Check speed limit exceed on the backend with respect to user locale. Speed is converted to km/h or mi/h depending on user settings. Localized speed is rounded to compare only integer parts.
Android Pass
isSpeedLimitExceeded
flag toRoutingInfo
. Use this flag to mark speedometer red.TODO: Add unit-test to cover
routing::RoutingSession::IsSpeedLimitExceeded(...)
As far as I can see current GPS info with speed value is passed from Android to backend in the next way:
LocationState.nativeLocationUpdated(time, lat, lon, accuracy, altitude, speed, bearing)
- wrappes values intolocation::GpsInfo
instance and callsandroid::Framework
android::Framework::OnLocationUpdated()
- passes GPS info to::Framework
Framework::OnLocationUpdated()
- passes GPS into toRoutingManager
RoutingManager::OnLocationUpdate()
- passes GPS info toextrapolation::Extrapolator
extrapolation::Extrapolator::OnLocationUpdate()
- saves GPS info into fieldm_lastGpsInfo
.And to get last known GPS location and speed I had to add methods:
map::Framework::GetLastLocation()
which callsRoutingManager
RoutingManager::GetLastLocation()
which callsextrapolation::Extrapolator
extrapolation::Extrapolator::GetLastLocation()
which returns pointer to the fieldm_lastGpsInfo
.Is this OK?
Update 2024-09-05
Introduced new classes (name could be changed):
So instead of using
Pair<String, String> StringUtils.nativeFormatSpeedAndUnits(double metersPerSecond)
method to get formatted speed we pass both current speed and speed limit asSpeedFormatted
objects from Framework to NavMenu. And nowNavMenu
class decides if there is speeding by comparing speed values in "km/h" or "mi/h" units.TODO: Verify in the wild on a real road with speed limit.
TODO: Add unit-test to cover
SpeedFormatted
class.TODO: check if iOS code need changes.
@ -195,3 +194,4 @@
public static native String nativeFormatSpeed(double speed); // TODO: move this method to StringUtils class.
public static native String nativeGetGe0Url(double lat, double lon, double zoomLevel, String name);
I left these
TODO
comments to make changes later. Too many changes for a single PR.@ -224,2 +223,3 @@
mSpeedValue.setText(speed.mSpeedStr);
if (info.speedLimitMps > 0.0 && last.getSpeed() > info.speedLimitMps)
if (speedLimitExceeded)
No more
Pair<>
classes.SpeedFormatted
contains all details for UI.@ -234,3 +234,3 @@
mSpeedUnits.setText(speedAndUnits.second);
mSpeedUnits.setText(info.speed.getUnitsStr(mActivity));
mSpeedViewContainer.setActivated(info.isSpeedCamLimitExceeded());
Here we decide if there was speeding
nit: looks like a lot of some logic here. Should it be (later?) done only in the C++ core?
@ -0,0 +12,4 @@
jobject distanceObject = env->NewObject(
speedFormattedClass, speedFormattedConstructor,
speedFormatted.GetSpeed(), jni::ToJavaString(env, speedFormatted.GetSpeedString()), static_cast<uint8_t>(speedFormatted.GetUnits()));
nit: Looks like a lot of code, with a lot of jni overhead. Can formatting/string preparation be done all in C++ code, passed as several strings (or maybe just one string returned as a concatenation of several strings?) to the iOS and Android UI just for displaying?
@ -0,0 +35,4 @@
public final String mSpeedStr;
public final SpeedFormatted.Units mUnits;
public SpeedFormatted(double mSpeed, @NonNull String mSpeedStr, byte unitsIndex)
nit: Are there simpler ideas on the implementation? E.g. return an array of 3 strings instead of introducing a class? How will it work on iOS? On Qt/desktop platforms?
@ -234,3 +234,3 @@
mSpeedUnits.setText(speedAndUnits.second);
mSpeedUnits.setText(info.speed.getUnitsStr(mActivity));
mSpeedViewContainer.setActivated(info.isSpeedCamLimitExceeded());
Here we compare km with km, or mi with mi, right? What about the threshold idea?
@ -0,0 +10,4 @@
{
using namespace measurement_utils;
SpeedFormatted::SpeedFormatted(double speedMps) : SpeedFormatted(speedMps, GetMeasurementUnits()) {}
It would be great to avoid introducing an implicit call to some external GetMeasurementUnits() method, and always pass it explicitly into the second constructor below.
@ -0,0 +34,4 @@
std::string SpeedFormatted::GetSpeedString() const
{
if (!IsValid())
What is the situation when this class can be invalid? Can we guarantee that when it is created, it is always valid?
@ -0,0 +35,4 @@
std::string SpeedFormatted::GetSpeedString() const
{
if (!IsValid())
return "";
nit: return {}
@ -0,0 +47,4 @@
return ToStringPrecision(m_speed, precision);
}
std::string SpeedFormatted::GetUnitsString() const
nit: We have in the UI:
There are already several classes for formatting. Does it make sense to write a single wrapper with simple interface for all these cases?
@ -0,0 +6,4 @@
namespace platform
{
class SpeedFormatted
nit: Can it be a struct with 3 values, filled by a single function call?
Why not 0.0?
@ -0,0 +35,4 @@
public final String mSpeedStr;
public final SpeedFormatted.Units mUnits;
public SpeedFormatted(double mSpeed, @NonNull String mSpeedStr, byte unitsIndex)
In iOS code navigation UI get speed from iOS API and speed limit from DTO
MWMNavigationDashboardEntity
(see NavigationControlView.swift:159 ). iOS converts m/s to km/h or mi/h in UI code callingmeasurement_utils::MpsToUnits(...)
. Also it compares speed and limit values in m/s and doesn't do rounding.To avoid JNI conversion from m/s to metric or imperial units I pass current speed and speed limit using
SpeedFormatted
class. So we have only one JNI call toFramework.nativeGetRouteFollowingInfo()
.You propose to pass
String speedStr
,String speedLimitStr
,byte speedUnits
,bool isSpeedLimitExceeded
instead, right?@ -0,0 +34,4 @@
std::string SpeedFormatted::GetSpeedString() const
{
if (!IsValid())
Speed limit could be
0.0
which means no limits at all. But if speed limit in OSM data is not set we have-1.0
. So it makes sense to return""
if OSM data has no limit defined.@ -0,0 +35,4 @@
public final String mSpeedStr;
public final SpeedFormatted.Units mUnits;
public SpeedFormatted(double mSpeed, @NonNull String mSpeedStr, byte unitsIndex)
On iOS information comes from two methods:
It would be great to have one source of truth on all platforms, without any logic. E.g. just strings to display and flags like "speed limit was hit", or better 3-state like "no speeding/limit hit/fine limit hit".
To avoid slow JNI calls, something like this may be used:
return currentSpeedStr.append(';').append(speedLimit).append(';').append(speedingFlag).apend(';').append(unitsStr);
Then it can be decoded in Java right before displaying.
Passing all values separately is also ok, just slower a bit.
@ -0,0 +34,4 @@
std::string SpeedFormatted::GetSpeedString() const
{
if (!IsValid())
Store "invalid" value in valid class doesn't look clean. C++ has std::optional for that, there are also nullptr and empty string that can be used in JNI context to define "missing" speed limit vs "unlimited". AFAIR unlimited roads are only in Germany, and passing there something like 999 should work fine too.
@ -0,0 +35,4 @@
public final String mSpeedStr;
public final SpeedFormatted.Units mUnits;
public SpeedFormatted(double mSpeed, @NonNull String mSpeedStr, byte unitsIndex)
As far as I can tell, iOS doesn't have problem with units and formatting. Swift calls C++ function from
measurement_utils
namespace to convert m/s to units-per-hour and format speed to string. No problems with Swift<->C++ calls, as far as I can see.New approach when
MWMRoutingManager
for iOS andFramework.nativeGetRouteFollowingInfo()
for Android do speed convertions and have some new protocol with';'
separators looks like overengineering to me.I propose to drop
SpeedFormatted
code and let UI do units conversions and string formatting with plain Java. I think functions withinmeasurement_utils
namespace would be easy to port to Java. This would minimize objects allocation between C++ and Java (get backdouble speedLimitMps
as inmaster
). What does iOS devs think of this?