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) {

4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
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();
				} 
			} 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
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 {
Full Snippet Info
3
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
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);
    } 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
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;
	} 
 
Full Snippet Info
4
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
See Code Examples for Android SipManager Methods: