Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
To get help please explain what you want to do and provide the code used to
start the NativeService.
Original comment by boss...@yahoo.fr
on 28 Apr 2011 at 12:38
Thanks for you help!
I want to do a simple example,It's only call.
outgoing is ok.
but I don't know how to monitor the Incoming and display it.
Original comment by max_yong...@163.com
on 28 Apr 2011 at 3:18
final BroadcastReceiver mSipBroadCastRecv = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
InviteState state;
final String action = intent.getAction();
if(NgnInviteEventArgs.ACTION_INVITE_EVENT.equals(action)){
NgnInviteEventArgs args = intent.getParcelableExtra(NgnEventArgs.EXTRA_EMBEDDED);
if(args == null){
Log.e(TAG, "Invalid event args");
return;
}
Log.d(TAG, "This is an event for session number "+args.getSessionId());
// Retrieve the session from the store
NgnAVSession avSession = NgnAVSession.getSession(args.getSessionId());
if(avSession == null){
Log.e(TAG, "Cannot find session");
return;
}
switch((state = avSession.getState())){
case NONE:
default:
break;
case INCOMING:
Log.i(TAG, "Incoming call");
break;
case INPROGRESS:
Log.i(TAG, "Call in progress");
break;
case REMOTE_RINGING:
Log.i(TAG, "Remote party is ringing");
break;
case EARLY_MEDIA:
Log.i(TAG, "Early media started");
break;
case INCALL:
Log.i(TAG, "Call connected");
break;
case TERMINATING:
Log.i(TAG, "Call terminating");
break;
case TERMINATED:
Log.i(TAG, "Call terminated");
break;
}
}
}
};
Original comment by boss...@yahoo.fr
on 29 Apr 2011 at 7:23
Off course you must register the broadcast receiver like this:
final IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(NgnInviteEventArgs.ACTION_INVITE_EVENT);
registerReceiver(mSipBroadCastRecv, intentFilter);
Original comment by boss...@yahoo.fr
on 29 Apr 2011 at 7:37
[deleted comment]
you did me a great favor.
I will take a closer look.
thanks a lot again!
Original comment by max_yong...@163.com
on 29 Apr 2011 at 7:53
Original comment by boss...@yahoo.fr
on 19 May 2011 at 5:11
Original issue reported on code.google.com by
max_yong...@163.com
on 27 Apr 2011 at 9:04