Enable and Disable MTP
System Requirement
Version Requirement: Ensure that 'wizarviewagentassistant' is version 2.10.60 or higher.
API Functions
Enable/Disable MTP
void setMtp(boolean enable)
throws DeviceException
This function allows you to enable or disable MTP.
Parameters
enable
for the MTP setting, a boolean value is used: true enables MTP, while false disables it.
Check MTP Status
boolean getMtpStatus()
throws DeviceException
Returns 'true' if MTP is enabled, 'false' if disabled.
Returns
boolean
a boolean representation of the result.
true if enabled. false if disabled.
Snippet Code Flow
ISystemDevice systemDevice = POSTerminalAdvance.getInstance().getSystemDevice();
systemDevice.open(this.mContext);
systemDevice.setMtp(true);
systemDevice.getMtpStatus()
systemDevice.close();
Resources
Demo Application:
Download the Demo App for a practical implementation example.
Last updated