mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-21 13:48:11 +00:00
Added missing URI handler schemes
This commit is contained in:
parent
274ed49f16
commit
b7996b9e82
2 changed files with 11 additions and 10 deletions
|
|
@ -101,9 +101,12 @@
|
|||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="tel" />
|
||||
<data android:scheme="sip" />
|
||||
<data android:scheme="callto" />
|
||||
<data android:scheme="sips" />
|
||||
<data android:scheme="sip-linphone" />
|
||||
<data android:scheme="sips-linphone" />
|
||||
<data android:scheme="linphone-sip" />
|
||||
<data android:scheme="linphone-sips" />
|
||||
<data android:scheme="linphone-config" />
|
||||
</intent-filter>
|
||||
|
||||
|
|
|
|||
|
|
@ -652,16 +652,14 @@ class MainActivity : GenericActivity() {
|
|||
}
|
||||
|
||||
Log.i("$TAG Found URI [$uri] as data for intent [${intent.action}]")
|
||||
val sipUriToCall = if (uri.startsWith("tel:")) {
|
||||
uri.substring("tel:".length)
|
||||
} else if (uri.startsWith("sip-linphone:")) {
|
||||
uri.replace("sip-linphone:", "sip:")
|
||||
} else {
|
||||
if (uri.startsWith("sips-linphone:")) {
|
||||
uri.replace("sips-linphone:", "sips:")
|
||||
} else {
|
||||
uri
|
||||
}.replace("%40", "@") // Unescape @ character if needed
|
||||
val sipUriToCall = when {
|
||||
uri.startsWith("tel:") -> uri.substring("tel:".length)
|
||||
uri.startsWith("callto:") -> uri.substring("callto:".length)
|
||||
uri.startsWith("sip-linphone:") -> uri.replace("sip-linphone:", "sip:")
|
||||
uri.startsWith("linphone-sip:") -> uri.replace("linphone-sip:", "sip:")
|
||||
uri.startsWith("sips-linphone:") -> uri.replace("sips-linphone:", "sips:")
|
||||
uri.startsWith("linphone-sips:") -> uri.replace("linphone-sips:", "sips:")
|
||||
else -> uri.replace("%40", "@") // Unescape @ character if needed
|
||||
}
|
||||
|
||||
coreContext.postOnCoreThread {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue