|
From: | Akib Sayyed |
Subject: | Re: [Linphone-developers] Need example codes for Android |
Date: | Wed, 6 Nov 2013 14:22:27 +0530 |
I tried codes from example but they are not working.
here is example code
test_registeration test_reg=new test_registeration(); // listener
final LinphoneCoreFactory lcFactory = LinphoneCoreFactory.instance();
LinphoneCore lc = null;
String username,domain;
username=null;
domain=null;
try {
lc=lcFactory.createLinphoneCore(test_reg);
} catch (LinphoneCoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
LinphoneCall call;
try {
call = lc.invite("sip:address@hidden");
if (call == null) {
System.out.println("Could not place call to " + "sip:address@hidden");
System.out.println("Aborting");
return;
}
} catch (LinphoneCoreException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Call to sip:address@hidden is in progress...");
// main loop for receiving notifications and doing background linphonecore work
while (true) {
lc.iterate();
try{
Thread.sleep(50);
} catch(InterruptedException ie) {
System.out.println("Interrupted!\nAborting");
return;
}
}
[Prev in Thread] | Current Thread | [Next in Thread] |