Repository navigation
Integrating with Roadstr
Roadstr accepts a destination sent explicitly to its launcher activity. The contract is the one already used by Tankful.
{"label":"Service station","lat":45.0703,"lon":7.6869}The sender must use:
- action
android.intent.action.SEND; - MIME type
application/json; - the JSON in the extra
android.intent.extra.TEXT(Intent.EXTRA_TEXT); - an explicit intent — for instance from
PackageManager.getLaunchIntentForPackage("app.roadstr").
val launch = packageManager.getLaunchIntentForPackage("app.roadstr") ?: return
launch.action = Intent.ACTION_SEND
launch.type = "application/json"
launch.putExtra(
Intent.EXTRA_TEXT,
"""{"label":"Service station","lat":45.0703,"lon":7.6869}""",
)
startActivity(launch)Roadstr handles a cold start and a new delivery to a running instance. If a GPS fix is already available it starts calculating the route at once; otherwise it opens the route planner with the destination filled in and leaves the origin and the Calculate route button to you.
The payload is treated as untrusted input and is rejected, leaving the current state unchanged, unless:
- it is a closed JSON object with exactly
label,latandlon, no other fields and no duplicate keys; -
labelis non-empty, contains no control characters and is at most 300 characters long; -
latis a finite number in[-90, 90]andlona finite number in[-180, 180]; - the UTF-8 payload is at most 4096 bytes.
The authoritative text is docs/DESTINATION_JSON.md.
Road reports are ordinary Nostr events (kinds 1315–1318). Roadstr's layouts, the open jooray/roadstr layout, the compact binary frames used over radio, and golden test vectors that you can run against your own implementation are specified in the interoperability specification. The document is written so that someone who has never seen Roadstr can build a compatible client or bridge. See also Road reports and Interoperability and MeshCore.
The speech engine behind Voice search is a separate project, usable by other Android apps:
roadstrapp/offline-speech-to-text (engine/), MIT-licensed, with a
small Kotlin API (OfflineSttEngine) and a reproducible build. How Roadstr vendors it:
third_party/offline-stt-engine.
Roadstr is open source under the MIT licence · Source · Releases · Changelog · Issues
Using Roadstr
- Installation
- Getting started
- Navigation
- Maps and offline use
- Search and Explore
- Road reports
- Public transport
- Voice guidance
- Voice search
- Journey and achievements
- Settings reference
Nostr and money
Trust
Build and extend