Added support for handling URIs with linphone: scheme

This commit is contained in:
Sylvain Berfini 2020-12-07 15:09:26 +01:00
parent 0937308a33
commit bb5b098007
2 changed files with 4 additions and 0 deletions

View file

@ -87,6 +87,7 @@
<data android:scheme="tel" /> <data android:scheme="tel" />
<data android:scheme="sip" /> <data android:scheme="sip" />
<data android:scheme="sips" /> <data android:scheme="sips" />
<data android:scheme="linphone" />
</intent-filter> </intent-filter>
<intent-filter> <intent-filter>

View file

@ -252,6 +252,9 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin
if (addressToCall.startsWith("tel:")) { if (addressToCall.startsWith("tel:")) {
Log.i("[Main Activity] Removing tel: prefix") Log.i("[Main Activity] Removing tel: prefix")
addressToCall = addressToCall.substring("tel:".length) addressToCall = addressToCall.substring("tel:".length)
} else if (addressToCall.startsWith("linphone:")) {
Log.i("[Main Activity] Removing linphone: prefix")
addressToCall = addressToCall.substring("linphone:".length)
} }
val address = coreContext.core.interpretUrl(addressToCall) val address = coreContext.core.interpretUrl(addressToCall)