How to Enable and Disable MTP: Difference between revisions

From wizarPOS
(Created page with "The system provides the AIDL interface to enable/disable MTP, When connect the service, the package name is '''com.wizarpos.wizarviewagentassistant''', and the class name is '...")
 
No edit summary
Line 1: Line 1:
The system provides the AIDL interface to enable/disable MTP, 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.
== System Interface ==
 
* '''AIDL Interface:''' Use the system-provided AIDL interface to manage MTP settings.
Version of wizarviewagentassistant should equal or larger than 2.10.60.
* '''Service Connection Details:'''
== API Overview ==
** '''Package Name:''' ''''com.wizarpos.wizarviewagentassistant''''
=== <big>enableMtp</big>===
** '''Class Name''': ''''com.wizarpos.wizarviewagentassistant.SystemExtApiService''''
  <syntaxhighlight lang="java">void enableMtp(boolean enable);</syntaxhighlight>
* '''Version Requirement:''' Ensure that ''''wizarviewagentassistant'''' is version 2.10.60 or higher.
Enable or disable MTP.
== API Functions ==
 
1. '''Enable/Disable MTP:'''
* ''''void enableMtp(boolean enable)'''';
* This function allows you to enable or disable MTP.
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-
Line 17: Line 19:
|   
|   
|}
|}
=== <big>getMtpStatus</big>===
2.  '''Check MTP Status:'''
  <syntaxhighlight lang="java">boolean getMtpStatus();</syntaxhighlight>
* ''''boolean getMtpStatus()'''';
true, enable; false, disable.
* Returns ''''true'''' if MTP is enabled, ''''false'''' if disabled.
 
{|class="wizarpostable"
{|class="wizarpostable"
|-
|-
Line 27: Line 28:
|  boolean || true or false.
|  boolean || true or false.
|}
|}
 
== Resources ==
== Download ==
* '''AIDL File:'''
=== AIDL===
** Download the necessary [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL File]for implementation.
Please download the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL]
* '''Demo Application:'''
=== Demo ===
** Download the [http://ftp.wizarpos.com/advanceSDK/example_enableethernet_mtp_setlanguage.7z Demo App] for a practical implementation example.
Please download the [http://ftp.wizarpos.com/advanceSDK/example_enableethernet_mtp_setlanguage.7z demo]

Revision as of 20:02, 28 December 2023

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

1. 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.

2. Check MTP Status:

  • 'boolean getMtpStatus()';
  • Returns 'true' if MTP is enabled, 'false' if disabled.
Returns
boolean true or false.

Resources

  • AIDL File:
    • Download the necessary AIDL Filefor implementation.
  • Demo Application:
    • Download the Demo App for a practical implementation example.