Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed help to use native IN-CALL sreen in 3rd party VOIP app
    text
    copied!<p>I am developing an VoIP app.</p> <pre><code>My app registers to a SIP based back-end server using a User-ID and password. Once the registration is successful, the user can make sip calls through this app. If the user uses the native phone dialer to dial out a number, My app intercepts the call and places the call through SIP. Once the call is intercepted, the native phone dialer goes to background and my app's 'call status' screen is displayed(my app comes to foreground). </code></pre> <p>My requirements are as follows:</p> <p>Once the call is intercepted, instead of showing my app's UI, we need to display the native dialer(default phone dialer) 'call status' / 'call progress' screen(like Samsung's Touchwiz for Samsung phones, HTC Sense for HTC phones etc), but the call should go through my app(SIP). Our app should take control over all the functionality of the native dialer 'call status' screen.</p> <p>Eg: If the user taps the 'Call End' button on the 'Call Status' screen of the native dialer, my app should end the call. Similarly all the controls on the 'Call Status' screen of the native dialer should handover control to my app to take the necessary action.</p> <p>Please let me know if it is possible to accomplish this and how to implement.</p> <pre><code>*public void onReceive(final Context context, Intent intent) { final String intentAction = intent.getAction(); if (intentAction.equals(Intent.ACTION_NEW_OUTGOING_CALL)) { SharedPreferences getPrefs = PreferenceManager .getDefaultSharedPreferences(context); boolean bool_CustomFlag = getPrefs.getBoolean( "use_custom_dialer_preference", true); if (bool_CustomFlag == true) { setResultData(null); final String strPhoneNum = intent* .getStringExtra(Intent.EXTRA_PHONE_NUMBER); (new Thread() { public void run() { try { Intent intent = new Intent(Intent.ACTION_CALL,Uri.fromParts("my_data_scheme", Uri.decode(strPhoneNum),null)); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } catch (Exception e) { e.printStackTrace(); } } }).start(); </code></pre> <p>} }*</p> <p>I have created my own data scheme for my outgoing call activity so that brodcastreciver can listen to Action_outgoing_call and launch the my outgoing call activity when call is made through native dialer.</p> <pre><code>*&lt;activity android:name=".OutgoingCallActivity" android:screenOrientation="portrait"&gt; &lt;intent-filter &gt; &lt;action android:name="android.intent.action.CALL" /&gt; &lt;category android:name= "android.intent.category.DEFAULT" /&gt; &lt;data android:scheme = "sip" /&gt; &lt;data android:scheme="my_data_scheme" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt;*` </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload