Package com.unitech.api.audio
Class AudioCtrl
java.lang.Object
com.unitech.api.audio.AudioCtrl
The type Audio ctrl.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBundleSet default notification sound bundle.BundlesetDialPadTouchTones(boolean enabled) Set dial pad touch tones bundle.BundlesetRingtoneSound(String data) Set ringtone sound bundle.BundlesetTouchSound(boolean enabled) Set touch sound bundle.BundlesetVibrateOnTouch(boolean enabled) Set vibrate on touch bundle.BundlesetVolume(int type, int volumeValue) Set Volume
-
Field Details
-
BUNDLE_ERROR_CODE
- See Also:
-
BUNDLE_ERROR_MSG
- See Also:
-
RESULT_CODE_ERROR
public static final int RESULT_CODE_ERROR- See Also:
-
RESULT_CODE_SUCCESS
public static final int RESULT_CODE_SUCCESS- See Also:
-
-
Constructor Details
-
AudioCtrl
public AudioCtrl(Context context) Instantiates a new Audio ctrl.- Parameters:
context- the context
-
-
Method Details
-
setDefaultNotificationSound
Set default notification sound bundle.- Parameters:
data- Sound name (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
setRingtoneSound
Set ringtone sound bundle.- Parameters:
data- Sound name (String)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
setDialPadTouchTones
public Bundle setDialPadTouchTones(boolean enabled) Set dial pad touch tones bundle.- Parameters:
enabled- true or false (boolean)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
setTouchSound
public Bundle setTouchSound(boolean enabled) Set touch sound bundle.- Parameters:
enabled- true or false (boolean)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
setVibrateOnTouch
public Bundle setVibrateOnTouch(boolean enabled) Set vibrate on touch bundle.- Parameters:
enabled- true for false (boolean)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-
setVolume
public Bundle setVolume(int type, int volumeValue) Set Volume- Parameters:
type- 2:Ring, 3:Media, 4:Alarm (int)volumeValue- 0-100 (int)- Returns:
- A bundle contains the error code and message
int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
String errorMsg = bundle.getString("errorMsg");
-