com.nokia.mid.setting
Class ToneSetting

java.lang.Object
  extended by com.nokia.mid.setting.ToneSetting

public final class ToneSetting
extends java.lang.Object

Setting provides tone settings retrieving and change notification to client which implements ToneSettingListener.

Copyright (c) 2013 Nokia Mobile Phones

Code Snippet 1:
 // This is a sample code to get the path of ring tone

 ToneSetting.getToneSetting(Setting.SETTING_RINGTONE);

 

Code Snippet 2:

 // This is a sample code to subscribe/unsubscribe setting change notification

 ToneSetting.subscribeListener(this);

 ToneSetting.unSubscribeListener(this);

 

Code Snippet 3:

 // This is a sample code to implement a ToneSettingListener in a class which implements this interface

 public void settingChanged(int setting, String value) {
 form.append("Receive change notification. Setting is " + setting + " value is " + value);
 }
 


Field Summary
static int SETTING_MESSAGETONE
          Constant for message tone setting.
static int SETTING_RINGTONE
          Constant for ring tone setting.
static int SETTING_RINGTONE_SIM2
           Constant for SIM2 ring tone setting.
 
Method Summary
static java.lang.String getToneSetting(int index)
          Retrieve tone file path.
static int getVolumeSetting(int index)
          Retrieve tone volume.
static void subscribeListener(ToneSettingListener listener)
          Subscribe tone setting change listener.
static void unSubscribeListener(ToneSettingListener listener)
          unSubscribe tone setting change listener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SETTING_RINGTONE

public static final int SETTING_RINGTONE

Constant for ring tone setting.

SETTING_RINGTONE has the value 0x01.

See Also:
Constant Field Values

SETTING_RINGTONE_SIM2

public static final int SETTING_RINGTONE_SIM2

Constant for SIM2 ring tone setting. Only valid for Dual SIM phones

SETTING_RINGTONE_SIM2 has the value 0x02.

See Also:
Constant Field Values

SETTING_MESSAGETONE

public static final int SETTING_MESSAGETONE

Constant for message tone setting.

SETTING_MESSAGETONE has the value 0x03.

See Also:
Constant Field Values
Method Detail

subscribeListener

public static void subscribeListener(ToneSettingListener listener)
Subscribe tone setting change listener.

Parameters:
listener - the object that will receive the tone setting change event.

unSubscribeListener

public static void unSubscribeListener(ToneSettingListener listener)
unSubscribe tone setting change listener.

Parameters:
listener - the object that is receiving the tone setting change event.

getToneSetting

public static java.lang.String getToneSetting(int index)
Retrieve tone file path.

Parameters:
index - the index of the setting.
Returns:
path to selected tone. Returns empty string if tone is not set, or null, if setting is not valid

getVolumeSetting

public static int getVolumeSetting(int index)
Retrieve tone volume.

Parameters:
index - the index of the setting.
Returns:
volume level of selected tone, valid range [0..10]. return -1 if volume level cannot be read.


Copyright © 2012 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 Series 40 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.