I am using android studio and playing around with CsipSimple. I am trying to figure out the flow for an outgoing call.
There is a method called Place call, which triggers the intent that handles the action ACTION_CALL for the scheme csip
@Override
public void placeCall(String number, Long accId) {
if(!TextUtils.isEmpty(number)) {
Intent it = new Intent(Intent.ACTION_CALL);
it.setData(SipUri.forgeSipUri(SipManager.PROTOCOL_CSIP, SipUri.getCanonicalSipContact(number, false)));
it.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if(accId != null) {
it.putExtra(SipProfile.FIELD_ACC_ID, accId);
}
getActivity().startActivity(it);
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
resetInternals();
}
Here is the declaration of activity in the manifest, that handles the action
<activity
android:name="com.freemobile.ui.outgoingcall.OutgoingCallChooser"
android:allowTaskReparenting="false"
android:configChanges="orientation"
android:excludeFromRecents="true"
android:label="@string/call"
android:launchMode="singleTask"
android:permission="android.permission.USE_FREEMOBILE_SIP"
android:process=":sipStack"
android:taskAffinity=""
android:theme="@style/DarkTheme.Dialog" >
<intent-filter>
<action android:name="android.intent.action.CALL" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="csip" />
<data android:scheme="sip" />
<data android:scheme="sips" />
</intent-filter>
<intent-filter android:priority="10" >
<action android:name="android.phone.extra.NEW_CALL_INTENT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="csip" />
<data android:scheme="sip" />
<data android:scheme="sips" />
</intent-filter>
</activity>
I have put a debug point in the onCreate method of the activity OutgoingCallChooser. But it never comes there. Please help me. am i missing something obvious?