Intercept DIAL and CALL to tel: and rewrite to cheogram
Stephen Paul Weber
created
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.
@@ -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: