Class Overview
This class provides APIs to control the various settings related to device
roaming.
Summary
Public Methods |
boolean
|
isRoamingDataEnabled()
API to check whether cellular data usage during roaming is enabled.
|
boolean
|
isRoamingPushEnabled()
API to check whether processing of WAP PUSH messages during roaming is
enabled.
|
boolean
|
isRoamingSyncEnabled()
API to check whether automatic syncing during roaming is enabled.
|
boolean
|
isRoamingVoiceCallsEnabled()
API to check whether voice calls during roaming are enabled.
|
void
|
setRoamingData(boolean enable)
API to enable or disable cellular data usage during roaming.
|
void
|
setRoamingPush(boolean enable)
API to enable or disable processing of WAP Push messages during roaming.
|
void
|
setRoamingSync(boolean enable)
API to enable or disable automatic application sync during roaming.
|
void
|
setRoamingVoiceCalls(boolean enable)
API to enable or disable voice calls during device roaming.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Methods
public
boolean
isRoamingDataEnabled
()
API to check whether cellular data usage during roaming is enabled.
Returns
true
if data roaming is enabled, false
if data roaming is disabled
public
boolean
isRoamingPushEnabled
()
API to check whether processing of WAP PUSH messages during roaming is
enabled.
Returns
true
if WAP Push message processing is enabled, false
if WAP Push message
processing is disabled
public
boolean
isRoamingSyncEnabled
()
API to check whether automatic syncing during roaming is enabled.
Returns
true
if syncing is enabled, false
if syncing is disabled
public
boolean
isRoamingVoiceCallsEnabled
()
API to check whether voice calls during roaming are enabled.
An administrator can use this API to check whether voice calls during roaming are enabled.
The default value is true
(enabled).
Returns
true
if voice calls during roaming are enabled, else false
public
void
setRoamingData
(boolean enable)
API to enable or disable cellular data usage during roaming.
Parameters
enable
| true to enable, false to disable |
Usage
An administrator can use this API to enable or disable
cellular data usage during roaming. Disabling prevents applications from
connecting to the Internet while the device is in roaming mode. This setting is applied only
when the device is in roaming mode. If set to false (disable), the user cannot change this
setting because the corresponding UI is disabled. If set to true , the corresponding
UI setting is enabled, and the user can change settings.
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
RoamingPolicy roamingPolicy = edm.getRoamingPolicy();
//disable case
try {
boolean result = roamingPolicy.setRoamingData(false);
if(true == result)
{
//roaming data is disabled. User cannot change it.
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
}
//enable case
try {
boolean result = roamingPolicy.setRoamingData(true);
if(true == result)
{
// UI blocking is removed and user can change settings.
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
} |
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_ROAMING" permission which has a protection
level of signature. |
public
void
setRoamingPush
(boolean enable)
API to enable or disable processing of WAP Push messages during roaming.
Parameters
enable
| true to enable, false to disable |
Usage
An administrator can use this API to enable or disable
processing of WAP PUSH messages. Disabling prevents MMS
messages from being received during device roaming. This setting is
applied only when the device is in roaming mode. If set to false , the user
cannot change this setting because the corresponding UI is disabled.
If set to true , the corresponding UI setting is enabled, and the user can change
settings.
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
RoamingPolicy roamingPolicy = edm.getRoamingPolicy();
//disable case
try {
boolean result = roamingPolicy.setRoamingPush(false);
if(true == result)
{
// WAP push is disabled during device roaming and user cannot receive WAP Push messages.
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
}
//enable case
try {
boolean result = roamingPolicy.setRoamingPush(true);
if(true == result)
{
// UI blocking is removed and user can change settings.
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
} |
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_ROAMING" permission which has a protection
level of signature. |
public
void
setRoamingSync
(boolean enable)
API to enable or disable automatic application sync during roaming.
Parameters
enable
| true to enable, false to disable |
Usage
An administrator can use this API to enable or disable
the automatic sync of applications such as email (including
Gmail), contacts, calendar, and other application that use an account. This
setting is applied only when the device is in roaming mode. If set to false , the user
cannot change this setting because the corresponding UI is disabled.
If set to true , the corresponding UI setting is enabled, and the user can change
settings.
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
RoamingPolicy roamingPolicy = edm.getRoamingPolicy();
//disable
try {
boolean result = roamingPolicy.setRoamingSync(false);
if(true == result)
{
//roaming sync is disabled and user cannot change it
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
}
// enable
try {
boolean result = roamingPolicy.setRoamingSync(true);
if(true == result)
{
// UI blocking is removed and user can change settings.
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
} |
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_ROAMING" permission which has a protection
level of signature. |
public
void
setRoamingVoiceCalls
(boolean enable)
API to enable or disable voice calls during device roaming.
Parameters
enable
| true to enable voice calls during device roaming, false to disable voice calls during device roaming |
Usage
An administrator can use this API to enable or disable voice calls during device roaming.
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
RoamingPolicy roamingPolicy = edm.getRoamingPolicy();
try {
boolean result = roamingPolicy.setRoamingVoiceCalls(true);
if(true == result)
{
// User is allowed to make voice calls during device roaming.
}
}catch(SecurityException e) {
Log.w(TAG,"SecurityException: "+e);
} |
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_ROAMING" permission which has a protection
level of signature. |