com.nokia.mid.voip
Class VoipManager

java.lang.Object
  extended by com.nokia.mid.voip.VoipManager

public final class VoipManager
extends java.lang.Object

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

VOIP_MT_CALL_ALERTING

public static final java.lang.String VOIP_MT_CALL_ALERTING

Constant launch argument as String for alerting incoming call

This is constant String that is received as launch argument when MIDlet is launched for alerting incoming call. MIDlet can get this using getAppProperty for arg-0

See Also:
Constant Field Values

VOIP_MT_CALL_WAITING

public static final java.lang.String VOIP_MT_CALL_WAITING

Constant launch argument as String for waiting incoming call

This is constant String that is received as launch argument when MIDlet is launched for waiting incoming call. MIDlet can get this using getAppProperty for arg-0.

See Also:
Constant Field Values
Method Detail

createVoipSettingsInstance

public static VoipSettings createVoipSettingsInstance()

Creates reference to a object that implements VoipSettings interface.

Returns:
VoipSettings instance of VoIP settings that is used for modifying VoIP settings for this MIDlet.

createVoipAudioMTCallInstance

public static VoipAudioCall createVoipAudioMTCallInstance(int callId)

Creates reference to a object that implements VoipAudioCall interface using call ID.

This is used for incoming calls from remote user to this mobile. Call ID is received either via invocation launch arguments when MIDlet is not running or 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.

Parameters:
callId - call ID that is received via VoipMTCallListener.onIncomingCall(int) or invocation. call ID must be positive number.
Returns:
VoipAudioCall instance that is logical representation of the VoIP call to given MT call ID. If VoIP API is not enabled method returns null
Throws:
java.lang.IllegalArgumentException - if call ID is not positive number

createVoipAudioMOCallInstance

public static VoipAudioCall createVoipAudioMOCallInstance(java.lang.String uri)

Creates reference to an object that implements VoipAudioCall.

This method is used for creating outgoing (Mobile Originated) calls from this mobile to remote user. Call is not inititated until client calls method startCall using VoipAudioCall instance that is returned by this method.

Parameters:
uri - Recipient address as string
Returns:
VoipAudioCall instance that is logical representation of the VoIP call to given address. If VoIP API is not enabled, this method returns null

setVoipMTCallListener

public static boolean setVoipMTCallListener(VoipMTCallListener listener)

Sets incoming call (Mobile Terminated) listener

When VoipMTCallListener 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.

Returns:
true if VoIP API is supported, otherwise false


Copyright © 2013 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for S40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.