Set Preferred Network Type API

Important Reminder: Insert SIM Card First

Permission

The application declares the following permissions in the manifest:

 com.wizarpos.permission.MODIFY_PHONE_STATE

API Overview

setPreferredNetworkType

boolean setPreferredNetworkType(int phoneId, int networkType);

Set the preferred network type. Used for device configuration by some CDMA operators.

Parameters

phoneId

the ID of the subscription to set the preferred network type for.

networkType

the preferred network type, defined in RILConstants.java.

Returns

boolean

a boolean representation of the result.

true if success. false if failure.

getPreferredNetworkType

int getPreferredNetworkType(int phoneId);

Get the preferred network type. Used for device configuration by some CDMA operators.

Parameters

phoneId

the ID of the subscription to set the preferred network type for.

Returns

int

return the preferred network type, defined in RILConstants.java.

getSupportedNetworkTypes

NetworkType[] getSupportedNetworkTypes();

Get supported network type array. NetworkType: name, typeId;

Returns

NetworkType[]

the supported network type array.

Resource Download

  • Refer to the cloudpos apidemo - demo.

Last updated