Android SipAudioCall - 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 SipAudioCall class.

This code example shows how to use the following methods:getPeerProfile, isMuted, setListener, startAudio, toggleMute
                // Much of the client's interaction with the SIP Stack will 
                // happen via listeners.  Even making an outgoing call, don't 
                // forget to set up a listener to set things up once the call is established. 
                @Override 
                public void onCallEstablished(SipAudioCall call) {
                	call.setListener(this);
                	call.startAudio();
                    //call.setSpeakerMode(true); 
                    if(call.isMuted()) call.toggleMute();
                    updateStatus(call);
                } 
 
                @Override 
                public void onCallEnded(SipAudioCall call) {
                    updateStatus("Ready."); 
                } 
            }; 
 
            call = manager.makeAudioCall(me.getUriString(), sipAddress, listener, 30);
            //call.startAudio(); 

6
CodeRank
This code example shows how to use the following methods:setSpeakerMode, startAudio, toggleMute
		 
        SipAudioCall.Listener listener = new SipAudioCall.Listener() {
        	   
        	   @Override 
        	   public void onCallEstablished(SipAudioCall call) {
        	      call.startAudio();
        	      call.setSpeakerMode(true);
        	      call.toggleMute();
        	         
        	   } 
        	    
        	   @Override 
        	   public void onCallEnded(SipAudioCall call) {
        	      // Do something. 
        	   } 
        	}; 
        	String sipAddress ="sip:anupam90@sip2sip.info";
            mSipManager.makeAudioCall(mSipProfile.getUriString(), sipAddress, listener, 30);
            
        }catch(Exception e){}
5
CodeRank
This code example shows how to use the following methods:setSpeakerMode, startAudio, toggleMute
			callNext(); 
		} 
		 
		@Override 
		   public void onCallEstablished(SipAudioCall call) {
		      call.startAudio();
		      call.setSpeakerMode(true);
		      call.toggleMute();
		   } 
	} 
 
	class RegistrationListener implements SipRegistrationListener {
 
		public void onRegistering(String localProfileUri) {
			System.out.println("Registering...");
		} 
 
		public void onRegistrationDone(final String localProfileUri, long expiryTime) {
			System.out.println("Registered");
			setRegistered(true); 
5
CodeRank
This code example shows how to use the following methods:isMuted, startAudio, toggleMute
				public void onCallEstablished(SipAudioCall call) {
 
					updateText("Pratar med ", dst);
 
					stopSounds(); 
					call.startAudio();
					if (call.isMuted()) {
						call.toggleMute();
					} 
				} 
				@Override 
				public void onCallEnded(SipAudioCall session) {
					viewToast("Samtalet avslutades"); 
					finish();
				} 
				@Override 
				public void onError(SipAudioCall call, int errorCode, String errorMessage) {
					viewToast("Samtalet bröts"); 
					finish();
				} 
5
CodeRank
This code example shows how to use the following methods:close, endCall
	 */ 
	public void sipEndCalling(SipAudioCall call) {
 
		if (call != null) {
			try { 
				call.endCall();
				call.close();
			} catch (SipException e) {
				e.printStackTrace();
			} 
 
		} 
	} 
 
	/** 
	 * 关闭Sip会话 
	 *  
	 * @throws SipException 
	 */ 
	public void closeLocalProfile() { 
4
CodeRank
This code example shows how to use the following methods:setSpeakerMode, startAudio
				// happen via listeners. Even making an outgoing call, don't 
				// forget to set up a listener to set things up once the call is 
				// established. 
				@Override 
				public void onCallEstablished(SipAudioCall call) {
					call.startAudio();
					call.setSpeakerMode(true);
				} 
 
				@Override 
				public void onCallEnded(SipAudioCall call) {
					 
				} 
			}; 
			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) {
4
CodeRank
This code example shows how to use the following methods:setSpeakerMode, startAudio
					callStartTime = new Date().getTime();
					 
					timer = new Timer();
					timer.scheduleAtFixedRate(new CallTimeTask(), 10000, 10000); 
					 
					call.startAudio();
					call.setSpeakerMode(true);
				} 
 
				@Override 
				public void onCallEnded (SipAudioCall call) {
					Log.e("SIP", "onCallEnded");
					 
					if (mProximityWakeLock.isHeld()) {
						mProximityWakeLock.release();
					} 
					 
					timer.cancel();
					 
					handler.post(new Runnable(){
4
CodeRank
This code example shows how to use the following methods:close
							"Error when trying to close manager.", ee);
					ee.printStackTrace();
				} 
			} 
			if (call != null) {
				call.close();
			} 
		} 
	} 
 
	@Override 
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true; 
	} 
} 
4
CodeRank

Related Android SipAudioCall Questions & Answers:

See Code Examples for Android SipAudioCall Methods: