Java 类android.net.sip.SipManager 实例源码

项目:AndroidSIP    文件:MainActivity.java   
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());
    }
}
项目:Phony-Android    文件:PhonySipUtil.java   
/**
 * 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;
}
项目:SIPDemo    文件:WalkieTalkieActivity.java   
public void initializeManager() {
    if (mSipManager == null) {
        mSipManager = SipManager.newInstance(this);
    }

    initializeLocalProfile();
}