Android SipManager - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android SipManager class.

This code example shows how to use the following methods:makeAudioCall, open, setRegistrationListener
        mSipProfile = builder.build();
         
        Intent intent = new Intent();
        intent.setAction("android.SipDemo.INCOMING_CALL");
        PendingIntent pendingIntent = PendingIntent.getBroadcast(this, 0, intent, Intent.FILL_IN_DATA);
        mSipManager.open(mSipProfile, pendingIntent, null);
         
         
        mSipManager.setRegistrationListener(mSipProfile.getUriString(), new SipRegistrationListener() {
 
    		public void onRegistering(String localProfileUri) {
    		    updateStatus("Registering with SIP Server..."); 
    		} 
 
    		public void onRegistrationDone(String localProfileUri, long expiryTime) {
    		    updateStatus("Ready"); 
    		} 
    		    
    		public void onRegistrationFailed(String localProfileUri, int errorCode,
    		    String errorMessage) {

3
CodeRank
This code example shows how to use the following methods:close, makeAudioCall
					 
				} 
			}; 
			t = Toast.makeText(this, "innan call", Toast.LENGTH_SHORT);
			t.show();
			call = manager.makeAudioCall(me.getUriString(),
					"sip:raddningstjanst2@iptel.org", listener, 30);
 
		} catch (Exception e) {
			Log.i("WalkieTalkieActivity/InitiateCall",
					"Error when trying to close manager.", e);
			if (me != null) {
				try { 
					manager.close(me.getUriString());
				} catch (Exception ee) {
					Log.i("WalkieTalkieActivity/InitiateCall",
							"Error when trying to close manager.", ee);
					ee.printStackTrace();
				} 
			} 
4
CodeRank
This code example shows how to use the following methods:close
    private void unregisterProfile(final SipProfile p) {
        // run it on background thread for better UI response 
        new Thread(new Runnable() {
            public void run() { 
                try { 
                    mSipManager.close(p.getUriString());
                } catch (Exception e) {
                    Log.e(TAG, "unregister failed, SipService died?", e);
                } 
            } 
        }, "unregisterProfile").start();
    } 
 
    void deleteProfile(SipProfile p) {
        mSipProfileList.remove(p);
        SipPreference pref = mSipPreferenceMap.remove(p.getUriString());
        mSipListContainer.removePreference(pref);
    } 
 
    private void addProfile(SipProfile p) throws IOException {
3
CodeRank
This code example shows how to use the following methods:setRegistrationListener
        mSipListContainer.removePreference(pref);
    } 
 
    private void addProfile(SipProfile p) throws IOException {
        try { 
            mSipManager.setRegistrationListener(p.getUriString(),
                    createRegistrationListener()); 
        } catch (Exception e) {
            Log.e(TAG, "cannot set registration listener", e);
        } 
        mSipProfileList.add(p);
        addPreferenceFor(p);
    } 
 
    private void startSipEditor(final SipProfile profile) {
        mProfile = profile;
        Intent intent = new Intent(this, SipEditor.class);
        intent.putExtra(KEY_SIP_PROFILE, (Parcelable) profile);
        startActivityForResult(intent, REQUEST_ADD_OR_EDIT_SIP_PROFILE);
    } 
4
CodeRank
This code example shows how to use the following methods:close
	 * @throws SipException 
	 */ 
	public void closeLocalProfile() { 
		try { 
			if (mSipProfile != null) {
				mSipManager.close(mSipProfile.getUriString());
			} 
		} catch (SipException e) {
			e.printStackTrace();
		} 
	} 
 
	public SipManager getSipManager() {
		return mSipManager;
	} 
 
	public SipProfile getSipProfile() {
		return mSipProfile;
	} 
 
4
CodeRank
This code example shows how to use the following methods:open
			me = builder.build();
			Log.d("SesionController",sipDetails[0]+" "+sipDetails[1]+" "+" "+sipDetails[2]);
			Intent i = new Intent();
			i.setAction("android.SipDemo.INCOMING_CALL");
			PendingIntent pi = PendingIntent.getBroadcast(con, 0, i, Intent.FILL_IN_DATA);
			manager.open(me, pi, null);
 
		} 
		catch (ParseException e) {
			e.printStackTrace();
		} catch (SipException e) {
			e.printStackTrace();
		} 
	} 
	/** 
	 * Closes our connection to the sip server. 
	 * Must be run before closing the application. 
	 */ 
	public static void onClose(){ 
		if (manager == null) {
4
CodeRank
This code example shows how to use the following methods:setRegistrationListener
        mSipListContainer.removePreference(pref);
    } 
 
    private void addProfile(SipProfile p) throws IOException {
        try { 
            mSipManager.setRegistrationListener(p.getUriString(),
                    createRegistrationListener()); 
        } catch (Exception e) {
            Log.e(TAG, "cannot set registration listener", e);
        } 
        mSipProfileList.add(p);
        addPreferenceFor(p);
    } 
 
    private void startSipEditor(final SipProfile profile) {
        mProfile = profile;
        Intent intent = new Intent(this, SipEditor.class);
        intent.putExtra(KEY_SIP_PROFILE, (Parcelable) profile);
        startActivityForResult(intent, REQUEST_ADD_OR_EDIT_SIP_PROFILE);
    } 
4
CodeRank
See Code Examples for Android SipManager Methods: