當前位置: 首頁>>代碼示例>>Java>>正文


Java CustomDistribution.forceNoMultipleCalls方法代碼示例

本文整理匯總了Java中com.csipsimple.utils.CustomDistribution.forceNoMultipleCalls方法的典型用法代碼示例。如果您正苦於以下問題:Java CustomDistribution.forceNoMultipleCalls方法的具體用法?Java CustomDistribution.forceNoMultipleCalls怎麽用?Java CustomDistribution.forceNoMultipleCalls使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.csipsimple.utils.CustomDistribution的用法示例。


在下文中一共展示了CustomDistribution.forceNoMultipleCalls方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: makeCallWithOptions

import com.csipsimple.utils.CustomDistribution; //導入方法依賴的package包/類
@Override
public void makeCallWithOptions(final String callee, final int accountId, final Bundle options)
        throws RemoteException {
    SipService.this.enforceCallingOrSelfPermission(SipManager.PERMISSION_USE_SIP, null);
    //We have to ensure service is properly started and not just binded
    SipService.this.startService(new Intent(SipService.this, SipService.class));
    
    if(pjService == null) {
        Log.e(THIS_FILE, "Can't place call if service not started");
        // TODO - we should return a failing status here
        return;
    }
    
    if(!supportMultipleCalls) {
        // Check if there is no ongoing calls if so drop this request by alerting user
        SipCallSession activeCall = pjService.getActiveCallInProgress();
        if(activeCall != null) {
            if(!CustomDistribution.forceNoMultipleCalls()) {
                notifyUserOfMessage(R.string.not_configured_multiple_calls);
            }
            return;
        }
    }
    
    Intent intent = new Intent(SipManager.ACTION_SIP_CALL_LAUNCH);
    intent.putExtra(SipProfile.FIELD_ID, accountId);
    intent.putExtra(SipManager.EXTRA_SIP_CALL_TARGET, callee);
    intent.putExtra(SipManager.EXTRA_SIP_CALL_OPTIONS, options);
    sendOrderedBroadcast (intent , SipManager.PERMISSION_USE_SIP, mPlaceCallResultReceiver, null,  Activity.RESULT_OK, null, null);
    
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:32,代碼來源:SipService.java


注:本文中的com.csipsimple.utils.CustomDistribution.forceNoMultipleCalls方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。