本文整理汇总了Java中android.net.sip.SipManager类的典型用法代码示例。如果您正苦于以下问题:Java SipManager类的具体用法?Java SipManager怎么用?Java SipManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SipManager类属于android.net.sip包,在下文中一共展示了SipManager类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initSip
import android.net.sip.SipManager; //导入依赖的package包/类
private void initSip() {
account = SipApplication.getInstance().getAccount();
sipManager = SipManager.newInstance(this);
if (sipManager == null) {
showToast("SIP feature is not supported in your device");
return;
}
try {
SipProfile.Builder builder = new SipProfile.Builder(account.getUsername(), account.getDomain());
builder.setPassword(account.getPassword());
sipProfile = builder.build();
connectSip();
} catch (ParseException e) {
e.printStackTrace();
Log.e(TAG, e.getMessage());
showToast(e.getMessage());
}
}
示例2: getSipManager
import android.net.sip.SipManager; //导入依赖的package包/类
/**
* Get the sip account manager for the current context.
*
* @param context The current context to use.
* @return The {@link SipManager} for the given context.
*/
public static SipManager getSipManager(Context context) {
if (mSipManager == null) {
mSipManager = SipManager.newInstance(context.getApplicationContext());
}
return mSipManager;
}
示例3: initializeManager
import android.net.sip.SipManager; //导入依赖的package包/类
public void initializeManager() {
if (mSipManager == null) {
mSipManager = SipManager.newInstance(this);
}
initializeLocalProfile();
}