To protect user data, the input method module has incorporated a security mode, which includes the basic mode (BASIC) and full experience mode (FULL). In basic mode, the InputMethodExtensionAbility cannot call any system capability that may involve accessing or disclosing user privacy data. In full experience mode, there is no such restriction.
Users can switch between the basic mode and the full experience mode in Settings.
The InputMethodExtensionAbility process cannot start any other UIAbility or ExtensionAbility.
The InputMethodExtensionAbility is controlled by the system and cannot call the APIs that may access or disclose user personal data, or transfer data out of the process. Specifically, the InputMethodExtensionAbility cannot call the APIs related to the following: network, SMS, phone, microphone, location, camera, Bluetooth, wallpaper, payment, calendar, games, speaker, Wi-Fi, pasteboard, multimedia, contacts, common events, system account, health data, map service, push service, fusion search, shared memory, distributed features, advertising device identifier, vibration, and more.
The InputMethodExtensionAbility can use necessary system capabilities like IME Kit, ArkUI, windows, graphics, and screen management.
The InputMethodExtensionAbility only read the shared sandbox, and can read and write the independent sandbox of InputMethodExtensionAbility. The main entry of the application can read and write the shared sandbox and its independent sandbox.
The InputMethodExtensionAbility does not have the restrictions of the basic mode. It can start UIAbility or ExtensionAbility to call the APIs for accessing user data.
In full experience mode, the input method extension can read and write the shared sandbox.
In the onCreate lifecycle callback of InputMethodExtensionAbility, call getSecurityMode to query the security mode of the current input method app.
In basic mode, display the internal functionalities that can be used.
In full experience mode, you can use the user data access APIs for improving user experience.
To ensure stable input method functions, use only the basic input capabilities in basic mode. Do not transfer data outside the InputMethodExtensionAbility by bypassing the system mechanism.