How to Enable and Disable MTP: Difference between revisions
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
== API Functions == | == API Functions == | ||
=== <big>Enable/Disable MTP:</big> === | === <big>Enable/Disable MTP:</big> === | ||
<syntaxhighlight lang="java">void enableMtp(boolean enable);</syntaxhighlight> | |||
* This function allows you to enable or disable MTP. | * This function allows you to enable or disable MTP. | ||
{|class="wizarpostable" | {|class="wizarpostable" | ||
Line 20: | Line 20: | ||
|} | |} | ||
=== <big>Check MTP Status:</big> === | === <big>Check MTP Status:</big> === | ||
<syntaxhighlight lang="java">boolean getMtpStatus();</syntaxhighlight> | |||
* Returns ''''true'''' if MTP is enabled, ''''false'''' if disabled. | * Returns ''''true'''' if MTP is enabled, ''''false'''' if disabled. | ||
{|class="wizarpostable" | {|class="wizarpostable" |
Revision as of 16:02, 4 January 2024
System Interface
- AIDL Interface: Use the system-provided AIDL interface to manage MTP settings.
- Service Connection Details:
- Package Name: 'com.wizarpos.wizarviewagentassistant'
- Class Name: 'com.wizarpos.wizarviewagentassistant.SystemExtApiService'
- Version Requirement: Ensure that 'wizarviewagentassistant' is version 2.10.60 or higher.
API Functions
Enable/Disable MTP:
void enableMtp(boolean enable);
- This function allows you to enable or disable MTP.
Parameters | |
---|---|
enable | boolean: true, enable MTP, false, disable MTP. |
Check MTP Status:
boolean getMtpStatus();
- Returns 'true' if MTP is enabled, 'false' if disabled.
Returns | |
---|---|
boolean | true or false. |