[英]Using Native SIP Dialer while making SIP call from Application
我正在為SIP開發android應用程序。 我成功使用Jain -sip-stack制作了SIP Stack,但為了進行通話,我想將我的應用程序與Native SIP撥號程序集成以便進行通話。 這是默認設置,在Android手機中也可用。 可以使用本機撥號程序通過本機SIP撥號程序進行Sip呼叫。
任何幫助,將不勝感激..
謝謝!!!!!
是的,您可以使用本機撥號器進行Sip呼叫。
為此,您需要添加一個BroadcastReceiver
類...如下所示...
public class Dialer extends BroadcastReceiver
{
@Override
public void onReceive(Context context, final Intent intent) {
if (intent.getAction().equals("android.intent.action.NEW_OUTGOING_CALL")) {
String phoneNumber = intent.getExtras().getString( "android.intent.extra.PHONE_NUMBER");
// Call some function from here to make SIP Call using this phoneNumber.
// Use this "phoneNumber" to your sip application & setResultData null.
setResultData(null);
}
}
您需要將<intent-filter>
添加到您的AndroidManifest.xml
<receiver android:name=".Dialer" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
</intent-filter>
</receiver>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.