Set Preferred Network Type API

The system provides the AIDL interface to set the preferred network type, When connect the service, the package name is com.wizarpos.wizarviewagentassistant, and the class name is com.wizarpos.wizarviewagentassistant.SystemExtApiService. When the application uses the interface, it must import wizarviewagentassistant and add permissions to the Android manifest file.

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.

Download

Demo Application:

  • Download the Demo App for a practical implementation example.

Last updated