android.net.sip.SipManager Java Examples

The following examples show how to use android.net.sip.SipManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SipTester.java    From PermissionAgent with Apache License 2.0 6 votes vote down vote up
@Override
public boolean test() throws Throwable {
    if (!SipManager.isApiSupported(mContext)) {
        return true;
    }
    SipManager manager = SipManager.newInstance(mContext);
    if (manager == null) {
        return true;
    }
    SipProfile.Builder builder = new SipProfile.Builder("Permission", "127.0.0.1");
    builder.setPassword("password");
    SipProfile profile = builder.build();
    manager.open(profile);
    manager.close(profile.getUriString());
    return true;
}
 
Example #2
Source File: SipTester.java    From PermissionAgent with Apache License 2.0 6 votes vote down vote up
@Override
public boolean test() throws Throwable {
    if (!SipManager.isApiSupported(mContext)) {
        return true;
    }
    SipManager manager = SipManager.newInstance(mContext);
    if (manager == null) {
        return true;
    }
    SipProfile.Builder builder = new SipProfile.Builder("Permission", "127.0.0.1");
    builder.setPassword("password");
    SipProfile profile = builder.build();
    manager.open(profile);
    manager.close(profile.getUriString());
    return true;
}
 
Example #3
Source File: SIPManager.java    From Yahala-Messenger with MIT License 6 votes vote down vote up
public void initializeManager() {
    // Set up the intent filter.  This will be used to fire an
    // IncomingCallReceiver when someone calls the SIP address used by this
    // application.
    FileLog.e("Sip Manager", "initializeManager");
    IntentFilter filter = new IntentFilter();
    filter.addAction("com.yahala.sip.IncomingCallReceiver");
    callReceiver = new IncomingCallReceiver();
    ApplicationLoader.applicationContext.registerReceiver(callReceiver, filter);

    // "Push to talk" can be a serious pain when the screen keeps turning off.
    // Let's prevent that.
    if (manager == null) {
        manager = SipManager.newInstance(ApplicationLoader.applicationContext);
    }

    initializeLocalProfile();
}
 
Example #4
Source File: SipTest.java    From AndPermission with Apache License 2.0 6 votes vote down vote up
@Override
public boolean test() throws Throwable {
    if (!SipManager.isApiSupported(mContext)) {
        return true;
    }
    SipManager manager = SipManager.newInstance(mContext);
    if (manager == null) {
        return true;
    }
    SipProfile.Builder builder = new SipProfile.Builder(USER, IP);
    builder.setPassword(PASSWORD);
    SipProfile profile = builder.build();
    manager.open(profile);
    manager.close(profile.getUriString());
    return true;
}