fix: improve deep-link compatibility #198
2 changed files with 5 additions and 4 deletions
|
@ -46,6 +46,7 @@
|
||||||
<!-- for example: "LPA:1$..." -->
|
<!-- for example: "LPA:1$..." -->
|
||||||
<!-- refs: https://www.iana.org/assignments/uri-schemes/prov/lpa -->
|
<!-- refs: https://www.iana.org/assignments/uri-schemes/prov/lpa -->
|
||||||
<data android:scheme="lpa" />
|
<data android:scheme="lpa" />
|
||||||
|
<data android:scheme="LPA" tools:ignore="AppLinkUrlError" />
|
||||||
<data android:sspPrefix="1$" />
|
<data android:sspPrefix="1$" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
|
@ -123,8 +123,8 @@ class DownloadWizardActivity: BaseEuiccAccessActivity() {
|
||||||
// If we get an LPA string from deep-link intents, extract from there.
|
// If we get an LPA string from deep-link intents, extract from there.
|
||||||
// Note that `onRestoreInstanceState` could override this with user input,
|
// Note that `onRestoreInstanceState` could override this with user input,
|
||||||
// but that _is_ the desired behavior.
|
// but that _is_ the desired behavior.
|
||||||
val uri = intent.data
|
val uri = intent.data ?: return
|
||||||
if (uri?.scheme == "lpa") {
|
if (uri.scheme.contentEquals("lpa", ignoreCase = true)) {
|
||||||
val parsed = LPAString.parse(uri.schemeSpecificPart)
|
val parsed = LPAString.parse(uri.schemeSpecificPart)
|
||||||
state.smdp = parsed.address
|
state.smdp = parsed.address
|
||||||
state.matchingId = parsed.matchingId
|
state.matchingId = parsed.matchingId
|
||||||
|
|
Loading…
Add table
Reference in a new issue