i Build the app which contain SIP/VOIP call.i Run the app in samsung,Redmi,One plus One it Work fine But When i run the same app in Micromax,Moto G devices it crash when i Call SIP/VOIP Function.Its Showing the error in Logcat.
Error:
Error when trying to close manager. android.net.sip.SipException: VOIP API is not supported
and my function is
public void initiateCall() {
EditText Concode;
Concode=(EditText)findViewById(R.id.ConfCode);
String sipadd="sip address";
if(sipadd!= null && !sipadd.isEmpty()){
// updateStatus(sipAddress);
try {
SipAudioCall.Listener listener = new SipAudioCall.Listener() {
// 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.startAudio();
call.setSpeakerMode(false);
// call.toggleMute();
//updateStatus(call);
}
@Override
public void onCallEnded(SipAudioCall call) {
//updateStatus("Ready.");
}
};
call = manager.makeAudioCall(me.getUriString(), sipadd, listener, 30);
}
catch (Exception e) {
Log.i("JoinConfWithoutLogin/InitiateCall", "Error when trying to close manager.", e);
if (me != null) {
try {
manager.close(me.getUriString());
} catch (Exception ee) {
Log.i("MainActivity/InitiateCall",
"Error when trying to close manager.", ee);
ee.printStackTrace();
}
}
if (call != null) {
call.close();
}
}}
else {
new AlertDialog.Builder(this)
.setTitle("Error")
.setMessage("Enter Conferance Code")
.setNegativeButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// do nothing
}
})
.setIcon(android.R.drawable.ic_dialog_alert)
.show();
}
}
Whats the problem behind this? Help Me to solve this issue Thanks in advance.