Java Code Examples for android.net.sip.SipManager

The following examples show how to use android.net.sip.SipManager. These examples are extracted from open source projects. 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 Project: PermissionAgent   Source File: SipTester.java    License: 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 Project: PermissionAgent   Source File: SipTester.java    License: 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 Project: Yahala-Messenger   Source File: SIPManager.java    License: 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 Project: AndPermission   Source File: SipTest.java    License: 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;
}