Set Preferred Network Type API
Last updated
Last updated
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
The application declares the following permissions in the manifest:
com.wizarpos.permission.MODIFY_PHONE_STATE
boolean setPreferredNetworkType(int phoneId, int networkType);
Set the preferred network type. Used for device configuration by some CDMA operators.
phoneId
the ID of the subscription to set the preferred network type for.
networkType
the preferred network type, defined in RILConstants.java.
boolean
a boolean representation of the result.
true if success. false if failure.
int getPreferredNetworkType(int phoneId);
Get the preferred network type. Used for device configuration by some CDMA operators.
phoneId
the ID of the subscription to set the preferred network type for.
int
return the preferred network type, defined in RILConstants.java.
NetworkType[] getSupportedNetworkTypes();
Get supported network type array. NetworkType: name, typeId;
NetworkType[]
the supported network type array.
Demo Application:
Download the Demo App for a practical implementation example.