Enable/Disable Mobile Data API
Permission
The application declares the following permissions in the manifest:
android.permission.CLOUDPOS_SET_MOBILE_DATA
API Overview
setMobileDataEnabled
boolean setMobileDataEnabled(int slot, boolean enable);
Enable/Disable mobile data.
Parameters
slot
slot number, 1 is slot 1, 2 is slot 2.
enable
for the mobile data setting, a boolean value is used: true enables mobile data, while false disables it.
Returns
boolean
a boolean representation of the result.
true if success. false if failure.
setMobileDataRoamingEnabled
boolean setMobileDataRoamingEnabled(int slot, int roaming);
Enable/Disable mobile data roaming.
Parameters
slot
slot number, 1 is slot 1, 2 is slot 2.
roaming
for the mobile data roaming setting, a boolean value is used: true enables mobile data roaming, while false disables it.
Returns
boolean
a boolean representation of the result.
true if success. false if failure.
Resource Download
Refer to the cloudpos apidemo - demo.
Last updated