本文整理汇总了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);
}