Intercept DIAL and CALL to tel: and rewrite to cheogram This is a proof of concept. It catches tel: from browser, but also taps on call button in contacts, etc, and rewrites to a Cheogram JID. It does not query the user's roster for gateway options, or ask the gateways to convert the URI, but simply assumes Cheogram format and jams it in. It also does not initiate a call, but simply uses the default XmppUri action which will be to either add to roster or open conversation.
3 files changed, 12 insertions(+), 0 deletions(-) M src/main/AndroidManifest.xml M src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java M src/main/java/eu/siacs/conversations/utils/XmppUri.java
M src/main/AndroidManifest.xml => src/main/AndroidManifest.xml +8 -0
@@ 144,6 144,14 @@ <data android:scheme="imto" /> <data android:host="jabber" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.CALL" /> <action android:name="android.intent.action.DIAL" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="tel" /> </intent-filter> </activity> <activity android:name=".ui.StartConversationActivity"
M src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java => src/main/java/eu/siacs/conversations/ui/UriHandlerActivity.java +2 -0
@@ 205,6 205,8 @@ public class UriHandlerActivity extends AppCompatActivity { switch (data.getAction()) { case Intent.ACTION_VIEW: case Intent.ACTION_SENDTO: case Intent.ACTION_DIAL: case Intent.ACTION_CALL: handleUri(data.getData()); break; case ACTION_SCAN_QR_CODE:
M src/main/java/eu/siacs/conversations/utils/XmppUri.java => src/main/java/eu/siacs/conversations/utils/XmppUri.java +2 -0