kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
update QR code convention
rodzic
72af2b4a44
commit
2e4cae048f
|
@ -137,7 +137,7 @@
|
|||
<!-- The QR codes to share channel settings are shared as meshtastic URLS
|
||||
|
||||
an approximate example:
|
||||
http://www.meshtastic.org/e/YXNkZnF3ZXJhc2RmcXdlcmFzZGZxd2Vy
|
||||
http://meshtastic.org/e/YXNkZnF3ZXJhc2RmcXdlcmFzZGZxd2Vy
|
||||
-->
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
|
@ -146,11 +146,11 @@
|
|||
|
||||
<data
|
||||
android:scheme="https"
|
||||
android:host="www.meshtastic.org"
|
||||
android:host="meshtastic.org"
|
||||
android:pathPrefix="/e/" />
|
||||
<data
|
||||
android:scheme="https"
|
||||
android:host="www.meshtastic.org"
|
||||
android:host="meshtastic.org"
|
||||
android:pathPrefix="/E/" />
|
||||
</intent-filter>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ data class ChannelSet(
|
|||
) : Logging {
|
||||
companion object {
|
||||
|
||||
const val prefix = "https://www.meshtastic.org/e/#"
|
||||
const val prefix = "https://meshtastic.org/e/#"
|
||||
|
||||
private const val base64Flags = Base64.URL_SAFE + Base64.NO_WRAP + Base64.NO_PADDING
|
||||
|
||||
|
@ -65,7 +65,7 @@ data class ChannelSet(
|
|||
// We encode as UPPER case for the QR code URL because QR codes are more efficient for that special case
|
||||
val bitMatrix =
|
||||
multiFormatWriter.encode(
|
||||
getChannelUrl(true).toString(),
|
||||
getChannelUrl(false).toString(),
|
||||
BarcodeFormat.QR_CODE,
|
||||
960,
|
||||
960
|
||||
|
|
|
@ -8,7 +8,7 @@ class ChannelSetTest {
|
|||
/** make sure we match the python and device code behavior */
|
||||
@Test
|
||||
fun matchPython() {
|
||||
val url = Uri.parse("https://www.meshtastic.org/e/#CgUYAiIBAQ")
|
||||
val url = Uri.parse("https://meshtastic.org/e/#CgUYAiIBAQ")
|
||||
val cs = ChannelSet(url)
|
||||
Assert.assertEquals("LongFast", cs.primaryChannel!!.name)
|
||||
Assert.assertEquals("#LongFast-K", cs.primaryChannel!!.humanName)
|
||||
|
|
Ładowanie…
Reference in New Issue