|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nokia.mid.voip.VoipManager
public final class VoipManager
VoipManager
Contains methods to create the instances of VoipSettings
and VoipAudioCall
, but only if VoIP is supported by this device.
If VoIP is not supported null
is returned.
Manager also defines launch arguments when MIDlet associated VoIP account receives call. MIDlet can receive invoke reason as string using MIDlet properties. It should be noted that invoke arguments are not updated if MIDlet was already running while receiving call.
An example for determining invoke reason:... // argument 0 contains launch reason VOIP_MT_CALL_ALERTING or VOIP_MT_CALL_WAITING // getProperty is MIDlet class method String invoke_reason = getAppProperty( "arg-0" ); // argument 1 contains incoming call id int call_id = Integer.parseInt( getProperty( "arg-1" ) ); if ( VoipManager.VOIP_MT_CALL_ALERTING.equals( invoke_reason ){ // Incoming call and can start playing alert tone } else { // Waiting incoming call and should not play tones } // Create call instance using call id VoipAudioCall call = VoipManager.createVoipAudioMTCallInstance( call_id ); ... }
Field Summary | |
---|---|
static java.lang.String |
VOIP_MT_CALL_ALERTING
Constant launch argument as String for alerting incoming call |
static java.lang.String |
VOIP_MT_CALL_WAITING
Constant launch argument as String for waiting incoming call |
Method Summary | |
---|---|
static VoipAudioCall |
createVoipAudioMOCallInstance(java.lang.String uri)
Creates reference to an object that implements VoipAudioCall . |
static VoipAudioCall |
createVoipAudioMTCallInstance(int callId)
Creates reference to a object that implements VoipAudioCall interface using call ID. |
static VoipSettings |
createVoipSettingsInstance()
Creates reference to a object that implements VoipSettings interface. |
static boolean |
setVoipMTCallListener(VoipMTCallListener listener)
Sets incoming call (Mobile Terminated) listener |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VOIP_MT_CALL_ALERTING
Constant launch argument as String
for alerting incoming call
getAppProperty
for
arg-0
public static final java.lang.String VOIP_MT_CALL_WAITING
Constant launch argument as String
for waiting incoming call
getAppProperty
for
arg-0
.
Method Detail |
---|
public static VoipSettings createVoipSettingsInstance()
Creates reference to a object that implements VoipSettings
interface.
public static VoipAudioCall createVoipAudioMTCallInstance(int callId)
Creates reference to a object that implements VoipAudioCall
interface using call ID.
VoipMTCallListener#onIncomingCall(int)
.
Call is answered by calling method startCall
using returned VoipAudioCall instance. If client wants to reject
incoming call it can call method endCall
.
callId
- call ID that is received via VoipMTCallListener.onIncomingCall(int)
or invocation.
call ID must be positive number.
null
java.lang.IllegalArgumentException
- if call ID is not positive numberpublic static VoipAudioCall createVoipAudioMOCallInstance(java.lang.String uri)
Creates reference to an object that implements VoipAudioCall
.
startCall
using VoipAudioCall
instance that is returned by this method.
uri
- Recipient address as string
null
public static boolean setVoipMTCallListener(VoipMTCallListener listener)
Sets incoming call (Mobile Terminated) listener
WhenVoipMTCallListener
is registered MIDlet will receive notification when VoIP account associated with this MIDlet
is being called.
MIDlet can remove listener by calling setMTCallListener
with null
.
Calling setMTCallListener
with same listener twice has no effect.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |