mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-10-03 17:14:33 -04:00
docs: publish channels: main api
This commit is contained in:
1 parent
8c2e01e80a
commit
ef920d6014
12 files changed
+13
-13
No files matched your search
@@ -93,7 +93,7 @@
|
||||
<div class="breadcrumbs"><a href="../../index.html">core-navigation</a><span class="delimiter">/</span><a href="../index.html">org.meshtastic.core.navigation</a><span class="delimiter">/</span><span class="current">DeepLinkRouter</span></div>
|
||||
<div class="cover ">
|
||||
<h1 class="cover"><span>Deep</span><wbr><span>Link</span><wbr><span><span>Router</span></span></h1>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">DeepLinkRouter</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/navigation/src/commonMain/kotlin/org/meshtastic/core/navigation/DeepLinkRouter.kt#L44">source</a>)</span></span></div><p class="paragraph">Type-safe deep link parser for KMP Navigation 3.</p><p class="paragraph">Maps an incoming OS intent URI to a list of NavKeys representing the target backstack. This ensures that when a user deep links into a detail view, the logical "up" hierarchy is synthesized and correctly populated in the user-owned NavBackStack list.</p><p class="paragraph">Supports both legacy query-parameter URIs and modern RESTful path patterns:</p><ul><li><p class="paragraph"><code class="lang-kotlin">/nodes</code> -> List of all nodes</p></li><li><p class="paragraph"><code class="lang-kotlin">/nodes/{destNum}</code> -> Node details</p></li><li><p class="paragraph"><code class="lang-kotlin">/nodes/{destNum}/{metric}</code> -> Specific node metric (e.g., <code class="lang-kotlin">/nodes/1234/device-metrics</code>)</p></li><li><p class="paragraph"><code class="lang-kotlin">/messages</code> -> Conversation list</p></li><li><p class="paragraph"><code class="lang-kotlin">/messages/{contactKey}</code> -> Specific conversation</p></li><li><p class="paragraph"><code class="lang-kotlin">/settings</code> -> Settings root</p></li><li><p class="paragraph"><code class="lang-kotlin">/settings/{destNum}/{page}</code> -> Specific settings page for a node</p></li><li><p class="paragraph"><code class="lang-kotlin">/wifi-provision</code> -> WiFi provisioning screen</p></li><li><p class="paragraph"><code class="lang-kotlin">/wifi-provision?address={mac}</code> -> WiFi provisioning targeting a specific device MAC address</p></li><li><p class="paragraph"><code class="lang-kotlin">/connections?address={prefixedAddress}</code> -> Connections screen, auto-connecting to a prefixed device address (e.g. <code class="lang-kotlin">t192.168.1.1:4403</code> for TCP, <code class="lang-kotlin">xAA:BB:CC:DD:EE:FF</code> for BLE) — lets external tooling trigger a connection. <code class="lang-kotlin">address=n</code> disconnects instead of connecting.</p></li></ul></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="index.html">DeepLinkRouter</a><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/navigation/src/commonMain/kotlin/org/meshtastic/core/navigation/DeepLinkRouter.kt#L58">source</a>)</span></span></div><p class="paragraph">Deep-link router for KMP Navigation 3.</p><p class="paragraph">Maps an incoming OS intent URI to the back stack it should open, so a link into a detail view lands with its logical "up" hierarchy already populated. Every supported link is a <a href="https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/UriDeepLinkMatcher.html">UriDeepLinkMatcher</a> pattern whose placeholders decode straight into the target route's fields, wrapped with <a href="https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/deeplink/package-summary.html">withBackStack</a> to synthesize the parents.</p><p class="paragraph">Path literals match case-insensitively. The scheme and host are not part of the contract: <code class="lang-kotlin">meshtastic://meshtastic</code> and <code class="lang-kotlin">http(s)://meshtastic.org</code> links are routed identically, because the OS intent-filter already decides which hosts reach the app.</p><p class="paragraph">Supports both legacy query-parameter URIs and modern RESTful path patterns:</p><ul><li><p class="paragraph"><code class="lang-kotlin">/nodes</code> -> List of all nodes</p></li><li><p class="paragraph"><code class="lang-kotlin">/nodes/{destNum}</code> -> Node details</p></li><li><p class="paragraph"><code class="lang-kotlin">/nodes/{destNum}/{metric}</code> -> Specific node metric (e.g., <code class="lang-kotlin">/nodes/1234/device-metrics</code>)</p></li><li><p class="paragraph"><code class="lang-kotlin">/messages</code> -> Conversation list</p></li><li><p class="paragraph"><code class="lang-kotlin">/messages/{contactKey}</code> -> Specific conversation</p></li><li><p class="paragraph"><code class="lang-kotlin">/settings</code> -> Settings root</p></li><li><p class="paragraph"><code class="lang-kotlin">/settings/{destNum}/{page}</code> -> Specific settings page for a node</p></li><li><p class="paragraph"><code class="lang-kotlin">/wifi-provision</code> -> WiFi provisioning screen</p></li><li><p class="paragraph"><code class="lang-kotlin">/wifi-provision?address={mac}</code> -> WiFi provisioning targeting a specific device MAC address</p></li><li><p class="paragraph"><code class="lang-kotlin">/connections?address={prefixedAddress}</code> -> Connections screen, auto-connecting to a prefixed device address (e.g. <code class="lang-kotlin">t192.168.1.1:4403</code> for TCP, <code class="lang-kotlin">xAA:BB:CC:DD:EE:FF</code> for BLE) — lets external tooling trigger a connection. <code class="lang-kotlin">address=n</code> disconnects instead of connecting.</p></li></ul></div></div>
|
||||
</div>
|
||||
<div class="tabbedcontent">
|
||||
<div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="CONSTRUCTOR,TYPE,PROPERTY,FUNCTION">Members</button></div>
|
||||
@@ -110,7 +110,7 @@
|
||||
</span></span></div>
|
||||
<div>
|
||||
<div class="title">
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="top-level-path-segments.html">topLevelPathSegments</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html">Set</a><span class="token operator"><</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">></span></div><div class="brief "><p class="paragraph">Canonical set of top-level path segments this router dispatches on. <a href="route.html">route</a> refuses segments outside this set, so a new <code class="lang-kotlin">when</code> branch stays dead (and its feature tests fail) until its segment is added here. Every entry must also be declared as an <code class="lang-kotlin">android:pathPrefix</code> in the https App Links intent-filter in <code class="lang-kotlin">androidApp/src/main/AndroidManifest.xml</code> — DeepLinkManifestConsistencyTest (androidApp unit tests) enforces that directly from this set.</p></div></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="top-level-path-segments.html">topLevelPathSegments</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html">Set</a><span class="token operator"><</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">></span></div><div class="brief "><p class="paragraph">Canonical set of top-level path segments this router dispatches on. <a href="route.html">route</a> refuses segments outside this set, so a new pattern stays dead (and its feature tests fail) until its segment is added here. Every entry must also be declared as an <code class="lang-kotlin">android:pathPrefix</code> in the https App Links intent-filter in <code class="lang-kotlin">androidApp/src/main/AndroidManifest.xml</code> — DeepLinkManifestConsistencyTest (androidApp unit tests) enforces that directly from this set.</p></div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<div class="cover ">
|
||||
<h1 class="cover"><span><span>route</span></span></h1>
|
||||
</div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="route.html"><span class="token function">route</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">uri<span class="token operator">: </span><a href="../../../../core/common/org.meshtastic.core.common.util/-common-uri/index.html">CommonUri</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator"><</span><a href="https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavKey.html">NavKey</a><span class="token operator">></span><span class="token operator">?</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/navigation/src/commonMain/kotlin/org/meshtastic/core/navigation/DeepLinkRouter.kt#L80">source</a>)</span></span></div><p class="paragraph">Synthesizes a backstack list from an incoming Meshtastic URI.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A list of strongly-typed NavKeys representing the backstack, or null if the URI is not recognized.</p></span><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":core:navigation/commonMain" data-filterable-set=":core:navigation/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>uri</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The incoming OS intent URI (e.g. "meshtastic://meshtastic/share?message=hello")</p></div></div></div></div></div></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">fun </span><a href="route.html"><span class="token function">route</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">uri<span class="token operator">: </span><a href="../../../../core/common/org.meshtastic.core.common.util/-common-uri/index.html">CommonUri</a></span></span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator"><</span><a href="https://developer.android.com/reference/kotlin/androidx/navigation3/runtime/NavKey.html">NavKey</a><span class="token operator">></span><span class="token operator">?</span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/navigation/src/commonMain/kotlin/org/meshtastic/core/navigation/DeepLinkRouter.kt#L97">source</a>)</span></span></div><p class="paragraph">Synthesizes a backstack list from an incoming Meshtastic URI.</p><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A list of strongly-typed NavKeys representing the backstack, or null if the URI is not recognized.</p></span><h4 class="tableheader">Parameters</h4><div class="table"><div class="table-row table-row_content" data-filterable-current=":core:navigation/commonMain" data-filterable-set=":core:navigation/commonMain"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><u><span><span>uri</span></span></u></div></span></div><div><div class="title"><p class="paragraph">The incoming OS intent URI (e.g. "meshtastic://meshtastic/share?message=hello")</p></div></div></div></div></div></div></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer--container">
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@
|
||||
<div class="cover ">
|
||||
<h1 class="cover"><span>top</span><wbr><span>Level</span><wbr><span>Path</span><wbr><span><span>Segments</span></span></h1>
|
||||
</div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="top-level-path-segments.html">topLevelPathSegments</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html">Set</a><span class="token operator"><</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">></span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/navigation/src/commonMain/kotlin/org/meshtastic/core/navigation/DeepLinkRouter.kt#L52">source</a>)</span></span></div><p class="paragraph">Canonical set of top-level path segments this router dispatches on. <a href="route.html">route</a> refuses segments outside this set, so a new <code class="lang-kotlin">when</code> branch stays dead (and its feature tests fail) until its segment is added here. Every entry must also be declared as an <code class="lang-kotlin">android:pathPrefix</code> in the https App Links intent-filter in <code class="lang-kotlin">androidApp/src/main/AndroidManifest.xml</code> — DeepLinkManifestConsistencyTest (androidApp unit tests) enforces that directly from this set.</p></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">val </span><a href="top-level-path-segments.html">topLevelPathSegments</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html">Set</a><span class="token operator"><</span><a href="https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html">String</a><span class="token operator">></span><span class="source-link-wrapper"><span class="source-link" data-element-type="source-link">(<a href="https://github.com/meshtastic/Meshtastic-Android/blob/main/core/navigation/src/commonMain/kotlin/org/meshtastic/core/navigation/DeepLinkRouter.kt#L66">source</a>)</span></span></div><p class="paragraph">Canonical set of top-level path segments this router dispatches on. <a href="route.html">route</a> refuses segments outside this set, so a new pattern stays dead (and its feature tests fail) until its segment is added here. Every entry must also be declared as an <code class="lang-kotlin">android:pathPrefix</code> in the https App Links intent-filter in <code class="lang-kotlin">androidApp/src/main/AndroidManifest.xml</code> — DeepLinkManifestConsistencyTest (androidApp unit tests) enforces that directly from this set.</p></div></div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<div class="footer--container">
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
</span></span></div>
|
||||
<div>
|
||||
<div class="title">
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="-deep-link-router/index.html">DeepLinkRouter</a></div><div class="brief "><p class="paragraph">Type-safe deep link parser for KMP Navigation 3.</p></div></div></div>
|
||||
<div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":core:navigation/commonMain"><div class="symbol monospace"><span class="token keyword">object </span><a href="-deep-link-router/index.html">DeepLinkRouter</a></div><div class="brief "><p class="paragraph">Deep-link router for KMP Navigation 3.</p></div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user