FIELD OF THE TECHNOLOGY

This disclosure relates to the field of terminal technologies, and in particular, to a method, an apparatus, and a storage medium for adapting a handle device to a third-party application.

BACKGROUND OF THE DISCLOSURE

A handle device is an input device of an electronic game machine. In the electronic game, a simulated character, a virtual object, or the like may be controlled by manipulating components such as buttons of the handle device. With the development of the terminal technologies, at present, a handle may be connected to a smart TV, a smartphone, or the like, and handle device components may be activated through a handle assistant to control a simulated character in a game running on a terminal by using a game handle.

SUMMARY

An embodiment of this disclosure provides a method for adapting a handle to a third-party application, performed by a terminal in a sandbox environment, the method including:

identifying the third-party application currently run by the terminal and an activity page currently displayed by the third-party application;

capturing a handle event generated by a handle device connected to the terminal;

analyzing the handle event to obtain an analyzing result, and generating, according to the analyzing result, a first touch event used for controlling the activity page; and

transmitting the first touch event to the third-party application for execution, so that the third-party application controls the activity page.

An embodiment of this disclosure provides an apparatus for adapting a handle to a third-party application, installed on a terminal and run in a sandbox environment, the apparatus including:

an identification module, configured to identify the third-party application currently run by the terminal and an activity page currently displayed by the third-party application;

a capturing module, configured to capture a handle event generated by a handle device connected to the terminal;

a first generating module, configured to analyze the handle event to obtain an analyzing result, and generate, according to the analyzing result, a first touch event used for controlling the activity page; and

a transmission module, configured to transmit the first touch event to the third-party application for execution, so that the third-party application controls the activity page.

An embodiment of this disclosure provides an electronic device, including a memory and a processor in communication with the memory,

by reading executable program code stored in the memory, the processor running a program corresponding to the executable program code to implement the method for adapting a handle to a third-party application according to the embodiments of this disclosure.

An embodiment of this disclosure provides a storage medium, storing a processor executable instruction, the instruction, when executed by one or more processors, implementing the method for adapting a handle to a third-party application according to the embodiments of this disclosure.

