Method and device for using unadapted application on terminal, equipment and medium
By intelligently determining the application adaptation status and control type on the terminal side and dynamically selecting the adaptation strategy, the conflict between the terminal's fixed key value reporting mechanism and unadapted applications is resolved. This enables unadapted applications to run normally on pure button terminals, reducing development costs and improving compatibility and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HYTERA COMM CORP
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, the conflict between the fixed key value reporting mechanism of the terminal and the unadapted applications forces each application to be customized for the terminal, resulting in a huge amount of development work. Furthermore, the button functions are inconsistent across different terminal devices, and applications with touch screen interaction designs cannot run on terminals that only support physical buttons.
By intelligently determining the application's adaptation status and control type on the terminal side and dynamically selecting an adaptation strategy, the application that requires button operation automatically maps physical key values to target response information that the application can recognize. For applications that require touch screen operation, the button actions are accurately simulated as standard touch screen operations, thus realizing the mapping between button and touch screen operations.
It can run normally on pure button terminals without the need for custom application development, completely solving compatibility issues caused by hardware differences, significantly reducing application development costs, and improving the terminal's ecosystem compatibility and user experience.
Smart Images

Figure CN122044597A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of application control technology, and in particular to a method, apparatus, device, and medium for using unadapted applications on a terminal. Background Technology
[0002] With the development of mobile communication technology, terminal forms are becoming increasingly diversified. In specific fields such as industrial control, emergency communication, and portable devices, a large number of terminals adopt small-sized, non-touchscreen designs, achieving human-computer interaction only through physical buttons. These terminals face significant compatibility issues when running third-party applications: due to differences in the physical button layout and key value definitions among terminal manufacturers, and because the key values or broadcast signals reported by the Android system by default are fixed, when application developers have not adapted for a specific terminal, the application cannot recognize the key signals reported by the system, resulting in button operation failure.
[0003] Furthermore, this compatibility issue leads to two direct consequences: First, the same application may exhibit inconsistent physical button functionality across different terminal devices due to varying adaptation statuses, sometimes even rendering core functions completely unusable via button operation. Second, many applications designed for touchscreen interaction and lacking built-in physical button functionality will be completely unusable on terminals that only support physical buttons due to the lack of touch event input. This essentially creates a fragmentation of the application ecosystem: the same application cannot provide a consistent and usable user experience across terminals with different interaction types.
[0004] The current conventional solution to this problem is application-layer customization: application developers need to proactively adapt the key value definitions and broadcast mechanisms of the terminal buttons according to the characteristics of the terminal hardware, and redesign the UI layout for small-sized screens. This process involves code modification, functional testing, and multi-terminal compatibility debugging, requiring deep collaboration between terminal manufacturers and application developers. Not only is the development cycle long, but the adaptation cost also increases exponentially with the number of terminal models. Especially for vertical industry terminals with a small user base, application developers often lack the motivation to adapt, resulting in many high-quality applications being unable to run on non-touchscreen terminals, severely restricting the functional scalability of the terminals.
[0005] In summary, the fundamental flaw of existing technologies lies in the conflict between the fixed key-value reporting mechanism and unadapted applications, which forces each application to be customized for the terminal, resulting in a huge amount of development work. Summary of the Invention
[0006] This invention provides a method, apparatus, device, and medium for using unadapted applications on a terminal, aiming to solve the problem in the prior art where the fixed key-value reporting mechanism conflicts with unadapted applications, forcing each application to be customized for the terminal, resulting in a huge amount of development work.
[0007] In a first aspect, embodiments of the present invention provide a method for using an unadapted application on a terminal, comprising:
[0008] Determine whether the target application running in the foreground of the terminal is compatible with the terminal;
[0009] If the target application running in the foreground of the terminal is incompatible with the terminal, the operation type of the target application is confirmed;
[0010] If the target application's operation type is button operation, and a physical button on the terminal is detected to be pressed, the target response information of the target application corresponding to the physical button is reported to the target application according to the preset key-value mapping relationship of the target application.
[0011] If the target application's operation type is touch screen operation, and a physical button on the terminal is detected to be pressed, the touch screen operation corresponding to the physical button is executed according to the preset button touch screen operation mapping relationship.
[0012] A further technical solution is that determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0013] Determine whether the target application is in a preset list of compatible applications;
[0014] If the target application is in the preset list of compatible applications, it is determined that the target application is compatible with the terminal.
[0015] If the target application is not in the preset list of compatible applications, it is determined that the target application is not compatible with the terminal.
[0016] A further technical solution is that determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0017] When the target application is launched, the adaptation status of the target application is obtained through a preset adaptation information query interface;
[0018] If an adaptation status response identifier is received from the target application, it is determined whether the target application is compatible with the terminal based on the adaptation status response identifier.
[0019] A further technical solution is that confirming the control type of the target application includes:
[0020] If the target application is in the preset list of button operation applications, then the control type of the target application is confirmed to be button operation;
[0021] If the target application is in the preset list of touch screen operation applications, then the operation type of the target application is confirmed to be touch screen operation.
[0022] A further technical solution is that, before executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship, the method further includes: intercepting the preset original response information of the physical button reported to the target application.
[0023] A further technical solution is that if the target application's operation type is touch screen operation, virtual touch points are displayed on the terminal's screen.
[0024] The step of executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship includes:
[0025] The touch screen operation type corresponding to the physical button is determined according to the preset button touch screen operation mapping relationship;
[0026] If the touchscreen operation corresponding to the physical button is a movement operation, determine the movement direction of the virtual touch point based on the type of the movement operation and move it along that direction; and / or,
[0027] If the touch operation corresponding to the physical button is a single click, a touch event is generated at the virtual touch point based on the type of the single click operation, and the touch event is reported to the target application; and / or,
[0028] If the touch operation corresponding to the physical button is a swipe operation, a touch swipe event is generated based on the type of the swipe operation, and the touch swipe event is reported to the target application.
[0029] A further technical solution is that, according to the preset key-value mapping relationship of the target application, reporting the target response information of the target application corresponding to the physical key to the target application includes:
[0030] Obtain the identification information of the target application;
[0031] Based on the identification information, query the target response information of the target application corresponding to the physical button from the key-value mapping relationship;
[0032] Report the target response information to the target application.
[0033] Secondly, embodiments of the present invention also provide a device for using an unadapted application on a terminal, which includes a unit for performing the above-described method.
[0034] Thirdly, embodiments of the present invention also provide a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0035] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.
[0036] This invention provides a method, apparatus, device, and medium for using an unadapted application on a terminal. The method includes: determining whether a target application running in the foreground of the terminal is compatible with the terminal; if the target application is incompatible, confirming the control type of the target application; if the control type of the target application is a button operation and a physical button press is detected on the terminal, reporting the target response information corresponding to the physical button to the target application according to a preset key-value mapping relationship; if the control type of the target application is a touchscreen operation and a physical button press is detected on the terminal, executing the touchscreen operation corresponding to the physical button according to a preset button-touchscreen operation mapping relationship. This invention intelligently determines the application's compatibility status and control type on the terminal side and dynamically selects an adaptation strategy: for applications requiring button operations, it automatically maps physical key values to target response information recognizable by the application; for applications requiring touchscreen operations, it accurately simulates button actions as standard touchscreen operations. This solution enables unadapted applications to run normally on pure button terminals without custom development, completely solving compatibility issues caused by hardware differences, significantly reducing application development costs, and improving the terminal's ecosystem compatibility and user experience. Attached Figure Description
[0037] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a method for using an unadapted application on a terminal, as provided in an embodiment of the present invention.
[0039] Figure 2 A schematic block diagram illustrating the use of a device with an unadapted application on a terminal, as provided in an embodiment of the present invention;
[0040] Figure 3 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0041] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0043] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0044] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0045] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0046] Please see Figure 1 This invention provides a method for using an unadapted application on a terminal, the method comprising the following steps:
[0047] S1, determine whether the target application running in the foreground of the terminal is compatible with the terminal.
[0048] In practice, the system first determines whether the target application running in the foreground is compatible with the terminal, establishing the basis for subsequent processing decisions and ensuring the accuracy and necessity of system intervention. If the target application is identified as compatible, no action is required; if the application is identified as incompatible, its control type is further determined.
[0049] In some preferred embodiments, the above step "determining whether the target application running in the foreground of the terminal is compatible with the terminal" specifically includes the following steps: determining whether the target application is in a preset list of compatible applications; if the target application is in the preset list of compatible applications, determining that the target application is compatible with the terminal; if the target application is not in the preset list of compatible applications, determining that the target application is not compatible with the terminal.
[0050] In this embodiment, the list of compatible applications can be preset by those skilled in the art, and the present invention does not specifically limit this.
[0051] By employing a pre-defined list of compatible applications to determine application compatibility, a simple, efficient, and reliable mechanism is provided. This list serves as a clear standard, enabling terminals to quickly perform queries and comparisons, significantly reducing the logical complexity and computational overhead of the system's judgment. This whitelist-based determination method possesses extremely high determinism and predictability because the list of compatible applications is pre-defined, eliminating runtime uncertainties.
[0052] For terminal manufacturers, they can strictly control which applications are considered compatible, typically those with which they have deep collaborations or those that have undergone rigorous testing, thus ensuring user experience and functional stability on these applications. Meanwhile, for applications not on the list, the terminal is uniformly treated as not compatible and a compatibility solution is activated—a conservative but safe strategy.
[0053] Alternatively, in some preferred embodiments, the above step "determining whether the target application running in the foreground of the terminal is compatible with the terminal" specifically includes the following steps: when the target application is started, obtaining the adaptation status of the target application through a preset adaptation information query interface; if an adaptation status response identifier returned by the target application is received, determining whether the target application is compatible with the terminal based on the adaptation status response identifier; if no adaptation status response identifier returned by the target application is received, determining that the target application is not compatible with the terminal.
[0054] In this embodiment, a proactive and standardized application adaptation status judgment mechanism is implemented by defining a preset adaptation information query interface. This method promotes the establishment of an ecosystem standard, requiring application developers to declare their adaptation status in accordance with interface specifications, thereby realizing standardized communication between terminals and applications.
[0055] When the application starts, the terminal actively queries the adaptation information interface. The adaptation status response identifier returned by the application provides an authoritative and accurate basis for judgment, avoiding potential errors caused by guessing based on a list. For example, if the adaptation status response identifier is the preset first identifier, it is determined that it is adapted; if the adaptation status response identifier is the preset second identifier, it is determined that it is not adapted.
[0056] Furthermore, this method exhibits excellent forward compatibility: for historical applications that have not yet implemented this interface or are unwilling to follow this specification, the system uniformly determines them as incompatible if no response is received. This forms an effective safety fallback mechanism, ensuring that all applications are correctly processed by the system, either confirmed as compatible / incompatible through the compatibility information query interface, or entering the incompatible process due to no response, thus guaranteeing the comprehensive coverage of the compatibility solution without any omissions.
[0057] S2, if the target application running in the foreground of the terminal is incompatible with the terminal, confirm the operation type of the target application.
[0058] In practice, if the target application running in the foreground of the terminal is not compatible with the terminal, the operation type of the target application is further confirmed so that the system can accurately identify the core interaction method that the application relies on in its design. This provides a key basis for selecting the correct compatibility strategy and avoids possible operational conflicts or functional abnormalities caused by blind processing.
[0059] In some preferred embodiments, the above step "confirming the control type of the target application" specifically includes the following steps: if the target application is in a preset list of button operation applications, then the control type of the target application is confirmed to be button operation; if the target application is in a preset list of touch screen operation applications, then the control type of the target application is confirmed to be touch screen operation.
[0060] In this embodiment, the list of button operation applications and the list of touch screen operation applications are both preset by those skilled in the art, and the present invention does not specifically limit them.
[0061] By using pre-defined lists of applications for button and touchscreen operation, the method accurately identifies the control type of a target application, enabling the terminal to anticipate the core interaction patterns of different applications. This pre-classification strategy moves the decision-making process forward, allowing the terminal to quickly determine the control type with a simple list lookup, resulting in extremely high efficiency.
[0062] This embodiment ensures the accuracy of subsequent mapping strategy selection: for applications categorized as key-based operations, the terminal focuses on resolving key-value mapping issues and restoring their key functionality; for applications categorized as touch-based operations, the terminal fully simulates touch-screen operations to meet their interaction needs. This precise targeted processing avoids resource waste and strategy errors, ensuring that each type of uncompatible application receives the most suitable and effective compatibility support, thereby optimizing the overall user experience.
[0063] S3, if the control type of the target application is button operation, and a physical button on the terminal is detected to be pressed, the target response information of the target application corresponding to the physical button is reported to the target application according to the preset key value mapping relationship of the target application.
[0064] In specific implementation, if the target application's operation type is button operation, then according to the preset key-value mapping relationship of the target application, when the physical button is pressed, the target response information corresponding to the physical button in the target application is reported to the target application. The target response information can be a key value or a broadcast, which is not specifically limited in this invention. This mechanism enables the terminal to break through the traditional limitation of fixed key value reporting and realize the ability of the same physical button to report differentiated signals for different applications.
[0065] For example, a PTT button that was originally completely disabled due to a mismatch in key value definition can have its core call function fully restored by dynamically mapping it to a specific key value or broadcast that the target application can recognize, thereby ensuring the normal operation of basic business logic.
[0066] In some preferred embodiments, the above step "reporting the target response information of the physical button corresponding to the target application to the target application according to the preset key-value mapping relationship of the target application" specifically includes the following steps: obtaining the identification information of the target application; querying the target response information of the physical button corresponding to the target application from the key-value mapping relationship based on the identification information; and reporting the target response information to the target application.
[0067] In this embodiment, a highly customized and precise key function adaptation scheme is achieved by refining the query and reporting process of key-value mapping relationships. By obtaining the identification information of the target application (such as package name), the system can uniquely locate the target application, ensuring the accuracy of subsequent queries.
[0068] Based on this identification information, the target response information is queried from the key-value mapping relationship. This means that the terminal stores its own unique key mapping configuration for each different application. The same physical key can be mapped to completely different key values or broadcast information for different applications, realizing true "one-click multi-use" and personalized adaptation.
[0069] Finally, this specific information is reported to the target application, ensuring that the signal received by the application is exactly the signal it expects and can process, thus guaranteeing 100% that the button function will work. This method greatly improves the flexibility and accuracy of adaptation, meeting the diverse needs of various third-party applications for button signals and fundamentally solving compatibility issues caused by fixed key values.
[0070] S4. If the target application's operation type is touch screen operation, and a physical button on the terminal is detected to be pressed, the touch screen operation corresponding to the physical button is executed according to the preset button touch screen operation mapping relationship.
[0071] In practice, the mapping relationship between button and touch screen operations can be preset by those skilled in the art, and this invention does not specifically limit it.
[0072] If the target application's operation type is touch screen operation, and according to the preset button-touch screen operation mapping relationship, it is determined that the physical button is mapped to touch screen operation, then the physical button operation is converted into the corresponding touch screen operation and executed. This is equivalent to giving a pure button terminal a virtual touch screen interaction system. By accurately simulating standard touch screen operations such as clicking and swiping, applications that rely on touch screen operations can run normally on terminals with only physical buttons without any modification, greatly expanding the application compatibility range of the terminal. Furthermore, if the physical button is not mapped to touch screen operation, then the original response information of the physical button is responded to, such as key value or broadcast, which is not specifically limited in this invention.
[0073] In summary, the core technical objective of this invention lies in its autonomous and intelligent adaptation on the terminal side, completely eliminating the workload for application developers to customize development for specific terminals. Applications do not need to modify code, retest, or re-release versions for terminal adaptation, significantly reducing development costs and maintenance complexity. For terminal manufacturers, this solution greatly improves product ecosystem compatibility and user experience, enabling their hardware to seamlessly run a wider range of third-party applications, enhancing the product's competitiveness and attractiveness in the market. Ultimately, this invention builds a seamless and compatible bridge between terminals and applications, solving the long-standing ecosystem fragmentation caused by hardware differences through a pure software solution, and has significant industrial application value.
[0074] In some preferred embodiments, before the above step "execute the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship", the method further includes: intercepting the preset original response information of the physical button reported to the target application.
[0075] In this embodiment, by intercepting the original physical button response information reported to the target application before performing a touch operation, the purification of the event stream and the fundamental avoidance of conflicts are achieved. This is a key guarantee for the successful simulation of touch operation. Without interception, the original button events would also be reported to the target application while the terminal is simulating touch events. The target application might receive two completely different types of event inputs simultaneously, which could easily lead to confusion in the application's internal state, interface errors, or the execution of unexpected operations.
[0076] For example, if a directional key press event is both converted into coordinate movement and its original key value is reported, it might cause the application to trigger a menu item while moving the focus, resulting in an operational logic conflict. By intercepting the preset original response information of the physical keys reported to the target application, the terminal ensures that the interactive events perceived by the application originate from a unique and consistent source, i.e., all from simulated touch screen operations. This allows the application to run normally as if it were on a real touch screen device, completely eliminating all interference and side effects that physical key signals might cause, and ensuring the authenticity and reliability of the simulation process.
[0077] In some preferred embodiments, if the target application's operation type is a touch screen operation, a virtual touch point is displayed on the terminal's screen; the above step "execute the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship" specifically includes the following steps: determining the touch screen operation type corresponding to the physical button according to the preset button touch screen operation mapping relationship; if the touch screen operation corresponding to the physical button is a movement operation, determining the movement direction of the virtual touch point based on the type of the movement operation and moving it along that direction; and / or, if the touch screen operation corresponding to the physical button is a single click operation, generating a touch event at the virtual touch point based on the type of the single click operation and reporting the touch event to the target application; and / or, if the touch screen operation corresponding to the physical button is a swipe operation, generating a touch swipe event based on the type of the swipe operation and reporting the touch swipe event to the target application.
[0078] In this embodiment, by specifying the execution process of touch screen operations, a complete, intuitive, and user-perceptible virtual touch screen interaction solution is provided.
[0079] Specifically, virtual touch points are first displayed on the screen, providing users with a visual focus so that they can clearly understand the location and status of the current simulated operation, greatly improving the visibility and controllability of the operation and avoiding user confusion when operating blindly.
[0080] When a physical button on the terminal is detected to be pressed, the key value corresponding to that physical button is first obtained. Then, using the key value as the query basis, the pre-established and stored button-touchscreen operation mapping relationship on the terminal is accessed. This mapping relationship exists in the form of a data mapping table, which explicitly records the correspondence between each physical button key value and a standard touchscreen operation type. The data mapping table is searched based on the key value to locate the entry associated with that key value, and the mapped touchscreen operation type is read from that entry. The touchscreen operation types include movement, click, and swipe operations. If a corresponding relationship is successfully found, the determined touchscreen operation type is output as the basis for subsequent simulated operation instructions. If no relationship is found, it is determined that the physical button is not configured with touchscreen simulation functionality, and the process ends or is transferred to other default processing logic.
[0081] Furthermore, after determining that the touch operation type mapped to the physical button is a movement operation, the specific movement type specified by the movement operation is further parsed. The movement type is used to define the movement direction of the virtual touch point on the screen, including moving left, moving right, moving up, and moving down.
[0082] Obtain the coordinate information of the virtual touch point currently displayed on the terminal screen. Based on the parsed movement type, select a preset coordinate offset rule: if the movement is to the left, subtract a preset first offset from the current horizontal coordinate of the virtual touch point; if the movement is to the right, increase the first offset from the current horizontal coordinate; if the movement is upward, subtract a preset second offset from the current vertical coordinate; if the movement is downward, increase the second offset from the current vertical coordinate. The first and second offsets define the step distance for a single triggered movement.
[0083] The new coordinates of the virtual touch point after its movement are calculated based on the selected offset rule. Then, the terminal's graphics display control module is invoked to update the display position of the virtual touch point from its current coordinates to the new coordinates, thus visually completing a displacement along a specified direction. Simultaneously, the system internally records and updates the current position of the virtual touch point to the new coordinates. If the physical button is continuously pressed for more than a preset time threshold, the above coordinate calculation and position update process is repeated to achieve the continuous movement effect of the virtual touch point.
[0084] Furthermore, for click operations, by generating and reporting touch events at virtual touch points, the behavior of a finger clicking on screen elements is accurately simulated, ensuring that the application can correctly respond to commands such as selection and confirmation.
[0085] Furthermore, for swipe operations, generating and reporting touch swipe events perfectly replicates the interaction of finger swipes, enabling functions in the application that require swipes, such as scrolling lists and switching pages. This detailed mapping relationship transforms the abstract concept of "simulated touchscreen" into a series of concrete, executable operations with a good user experience, truly realizing the complete reproduction of all the core functions of touchscreen interaction using physical buttons.
[0086] This invention proposes a method for using unadapted applications on a terminal, comprising: determining whether a target application running in the foreground of the terminal is compatible with the terminal; if the target application is not compatible with the terminal, confirming the control type of the target application; if the control type of the target application is button operation, and a physical button press is detected on the terminal, reporting the target response information of the target application corresponding to the physical button to the target application according to a preset key-value mapping relationship of the target application; if the control type of the target application is touch screen operation, and a physical button press is detected on the terminal, executing the touch screen operation corresponding to the physical button according to a preset button-touch screen operation mapping relationship. This invention intelligently determines the application's compatibility status and control type on the terminal side and dynamically selects an adaptation strategy: for applications requiring button operation, it automatically maps physical key values to target response information recognizable by the application; for applications requiring touch screen operation, it accurately simulates button actions as standard touch screen operations. This solution enables unadapted applications to run normally on pure button terminals without custom development, completely solving compatibility issues caused by hardware differences, significantly reducing application development costs, and improving the terminal's ecosystem compatibility and user experience.
[0087] See Figure 2 Corresponding to the above-described method for using an incompatible application on a terminal, the present invention also provides an apparatus 20 for using an incompatible application on a terminal. This apparatus 20 includes a unit for performing the above-described method for using an incompatible application on a terminal, and can be configured in a desktop computer, tablet computer, laptop computer, or other terminal. Specifically, the apparatus 20 for using an incompatible application on a terminal includes:
[0088] Judgment unit 21 is used to determine whether the target application running in the foreground of the terminal is compatible with the terminal;
[0089] The acquisition unit 22 is used to determine the operation type of the target application when the target application running in the foreground of the terminal is not compatible with the terminal.
[0090] The first mapping unit 23 is used to report the target response information of the target application corresponding to the physical button to the target application according to the preset key value mapping relationship of the target application if the operation type of the target application is button operation and the physical button of the terminal is detected to be pressed.
[0091] The second mapping unit 24 is used to execute the touch operation corresponding to the physical button according to a preset button touch operation mapping relationship if the control type of the target application is touch operation and a physical button of the terminal is detected to be pressed.
[0092] In some preferred embodiments, determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0093] Determine whether the target application is in a preset list of compatible applications;
[0094] If the target application is in the preset list of compatible applications, it is determined that the target application is compatible with the terminal.
[0095] If the target application is not in the preset list of compatible applications, it is determined that the target application is not compatible with the terminal.
[0096] In some preferred embodiments, determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0097] When the target application is launched, the adaptation status of the target application is obtained through a preset adaptation information query interface;
[0098] If an adaptation status response identifier is received from the target application, determine whether the target application is compatible with the terminal based on the adaptation status response identifier;
[0099] If no adaptation status response identifier is received from the target application, it is determined that the target application is not compatible with the terminal.
[0100] In some preferred embodiments, confirming the control type of the target application includes:
[0101] If the target application is in the preset list of button operation applications, then the control type of the target application is confirmed to be button operation;
[0102] If the target application is in the preset list of touch screen operation applications, then the operation type of the target application is confirmed to be touch screen operation.
[0103] In some preferred embodiments, the apparatus further includes:
[0104] The interception unit is used to intercept the original response information preset by the physical button reported to the target application.
[0105] In some preferred embodiments, if the target application's operation type is touch screen operation, virtual touch points are displayed on the terminal's screen;
[0106] The step of executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship includes:
[0107] The touch screen operation type corresponding to the physical button is determined according to the preset button touch screen operation mapping relationship;
[0108] If the touchscreen operation corresponding to the physical button is a movement operation, determine the movement direction of the virtual touch point based on the type of the movement operation and move it along that direction; and / or,
[0109] If the touch operation corresponding to the physical button is a single click, a touch event is generated at the virtual touch point based on the type of the single click operation, and the touch event is reported to the target application; and / or,
[0110] If the touch operation corresponding to the physical button is a swipe operation, a touch swipe event is generated based on the type of the swipe operation, and the touch swipe event is reported to the target application.
[0111] In some preferred embodiments, the step of reporting the target response information of the physical key corresponding to the target application to the target application according to the preset key-value mapping relationship of the target application includes:
[0112] Obtain the identification information of the target application;
[0113] Based on the identification information, query the target response information of the target application corresponding to the physical button from the key-value mapping relationship;
[0114] Report the target response information to the target application.
[0115] It should be noted that those skilled in the art will clearly understand that the specific implementation process of the above-mentioned device 20 and each unit on the terminal without application adaptation can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0116] The aforementioned device 20, which uses an unadapted application on a terminal, can be implemented as a computer program, which can, for example... Figure 3 It runs on the computer device shown.
[0117] Please see Figure 3 ,Figure 3 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server. The terminal can be an electronic device with communication functions, such as a smartphone, tablet, laptop, desktop computer, personal digital assistant, or wearable device. The server can be a standalone server or a server cluster composed of multiple servers.
[0118] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0119] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to perform a method for using an unadapted application on a terminal.
[0120] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0121] The internal memory 504 provides an environment for the execution of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for using an unadapted application on a terminal.
[0122] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0123] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps:
[0124] Determine whether the target application running in the foreground of the terminal is compatible with the terminal;
[0125] If the target application running in the foreground of the terminal is incompatible with the terminal, the operation type of the target application is confirmed;
[0126] If the target application's operation type is button operation, and a physical button on the terminal is detected to be pressed, the target response information of the target application corresponding to the physical button is reported to the target application according to the preset key-value mapping relationship of the target application.
[0127] If the target application's operation type is touch screen operation, and a physical button on the terminal is detected to be pressed, the touch screen operation corresponding to the physical button is executed according to the preset button touch screen operation mapping relationship.
[0128] In some preferred embodiments, determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0129] Determine whether the target application is in a preset list of compatible applications;
[0130] If the target application is in the preset list of compatible applications, it is determined that the target application is compatible with the terminal.
[0131] If the target application is not in the preset list of compatible applications, it is determined that the target application is not compatible with the terminal.
[0132] In some preferred embodiments, determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0133] When the target application is launched, the adaptation status of the target application is obtained through a preset adaptation information query interface;
[0134] If an adaptation status response identifier is received from the target application, determine whether the target application is compatible with the terminal based on the adaptation status response identifier;
[0135] If no adaptation status response identifier is received from the target application, it is determined that the target application is not compatible with the terminal.
[0136] In some preferred embodiments, confirming the control type of the target application includes:
[0137] If the target application is in the preset list of button operation applications, then the control type of the target application is confirmed to be button operation;
[0138] If the target application is in the preset list of touch screen operation applications, then the operation type of the target application is confirmed to be touch screen operation.
[0139] In some preferred embodiments, before executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship, the method further includes: intercepting the preset original response information of the physical button reported to the target application.
[0140] In some preferred embodiments, if the target application's operation type is touch screen operation, virtual touch points are displayed on the terminal's screen;
[0141] The step of executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship includes:
[0142] The touch screen operation type corresponding to the physical button is determined according to the preset button touch screen operation mapping relationship;
[0143] If the touchscreen operation corresponding to the physical button is a movement operation, determine the movement direction of the virtual touch point based on the type of the movement operation and move it along that direction; and / or,
[0144] If the touch operation corresponding to the physical button is a single click, a touch event is generated at the virtual touch point based on the type of the single click operation, and the touch event is reported to the target application; and / or,
[0145] If the touch operation corresponding to the physical button is a swipe operation, a touch swipe event is generated based on the type of the swipe operation, and the touch swipe event is reported to the target application.
[0146] In some preferred embodiments, the step of reporting the target response information of the physical key corresponding to the target application to the target application according to the preset key-value mapping relationship of the target application includes:
[0147] Obtain the identification information of the target application;
[0148] Based on the identification information, query the target response information of the target application corresponding to the physical button from the key-value mapping relationship;
[0149] Report the target response information to the target application.
[0150] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0151] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0152] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the following steps:
[0153] Determine whether the target application running in the foreground of the terminal is compatible with the terminal;
[0154] If the target application running in the foreground of the terminal is incompatible with the terminal, the operation type of the target application is confirmed;
[0155] If the target application's operation type is button operation, and a physical button on the terminal is detected to be pressed, the target response information of the target application corresponding to the physical button is reported to the target application according to the preset key-value mapping relationship of the target application.
[0156] If the target application's operation type is touch screen operation, and a physical button on the terminal is detected to be pressed, the touch screen operation corresponding to the physical button is executed according to the preset button touch screen operation mapping relationship.
[0157] In some preferred embodiments, determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0158] Determine whether the target application is in a preset list of compatible applications;
[0159] If the target application is in the preset list of compatible applications, it is determined that the target application is compatible with the terminal.
[0160] If the target application is not in the preset list of compatible applications, it is determined that the target application is not compatible with the terminal.
[0161] In some preferred embodiments, determining whether the target application running in the foreground of the terminal is compatible with the terminal includes:
[0162] When the target application is launched, the adaptation status of the target application is obtained through a preset adaptation information query interface;
[0163] If an adaptation status response identifier is received from the target application, determine whether the target application is compatible with the terminal based on the adaptation status response identifier;
[0164] If no adaptation status response identifier is received from the target application, it is determined that the target application is not compatible with the terminal.
[0165] In some preferred embodiments, confirming the control type of the target application includes:
[0166] If the target application is in the preset list of button operation applications, then the control type of the target application is confirmed to be button operation;
[0167] If the target application is in the preset list of touch screen operation applications, then the operation type of the target application is confirmed to be touch screen operation.
[0168] In some preferred embodiments, before executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship, the method further includes: intercepting the preset original response information of the physical button reported to the target application.
[0169] In some preferred embodiments, if the target application's operation type is touch screen operation, virtual touch points are displayed on the terminal's screen;
[0170] The step of executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship includes:
[0171] The touch screen operation type corresponding to the physical button is determined according to the preset button touch screen operation mapping relationship;
[0172] If the touchscreen operation corresponding to the physical button is a movement operation, determine the movement direction of the virtual touch point based on the type of the movement operation and move it along that direction; and / or,
[0173] If the touch operation corresponding to the physical button is a single click, a touch event is generated at the virtual touch point based on the type of the single click operation, and the touch event is reported to the target application; and / or,
[0174] If the touch operation corresponding to the physical button is a swipe operation, a touch swipe event is generated based on the type of the swipe operation, and the touch swipe event is reported to the target application.
[0175] In some preferred embodiments, the step of reporting the target response information of the physical key corresponding to the target application to the target application according to the preset key-value mapping relationship of the target application includes:
[0176] Obtain the identification information of the target application;
[0177] Based on the identification information, query the target response information of the target application corresponding to the physical button from the key-value mapping relationship;
[0178] Report the target response information to the target application.
[0179] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.
[0180] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0181] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0182] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0183] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0184] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0185] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0186] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for using an unadapted application on a terminal, characterized in that, include: Determine whether the target application running in the foreground of the terminal is compatible with the terminal; If the target application running in the foreground of the terminal is incompatible with the terminal, the operation type of the target application is confirmed; If the target application's operation type is button operation, and a physical button on the terminal is detected to be pressed, the target response information of the target application corresponding to the physical button is reported to the target application according to the preset key-value mapping relationship of the target application. If the target application's operation type is touch screen operation, and a physical button on the terminal is detected to be pressed, the touch screen operation corresponding to the physical button is executed according to the preset button touch screen operation mapping relationship.
2. The method for using an unadapted application on a terminal according to claim 1, characterized in that, The step of determining whether the target application running in the foreground of the terminal is compatible with the terminal includes: Determine whether the target application is in a preset list of compatible applications; If the target application is in the preset list of compatible applications, it is determined that the target application is compatible with the terminal. If the target application is not in the preset list of compatible applications, it is determined that the target application is not compatible with the terminal.
3. The method for using an unadapted application on a terminal according to claim 1, characterized in that, The step of determining whether the target application running in the foreground of the terminal is compatible with the terminal includes: When the target application is launched, the adaptation status of the target application is obtained through a preset adaptation information query interface; If an adaptation status response identifier is received from the target application, it is determined whether the target application is compatible with the terminal based on the adaptation status response identifier.
4. The method for using an unadapted application on a terminal according to claim 1, characterized in that, The confirmation of the control type of the target application includes: If the target application is in the preset list of button operation applications, then the control type of the target application is confirmed to be button operation; If the target application is in the preset list of touch screen operation applications, then the operation type of the target application is confirmed to be touch screen operation.
5. The method for using an unadapted application on a terminal according to claim 1, characterized in that, Before executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship, the method further includes: intercepting the preset original response information of the physical button reported to the target application.
6. The method for using an unadapted application on a terminal according to claim 1, characterized in that, If the target application's operation type is touch screen operation, a virtual touch point is displayed on the terminal's screen; The step of executing the touch screen operation corresponding to the physical button according to the preset button touch screen operation mapping relationship includes: The touch screen operation type corresponding to the physical button is determined according to the preset button touch screen operation mapping relationship; If the touchscreen operation corresponding to the physical button is a movement operation, determine the movement direction of the virtual touch point based on the type of the movement operation and move it along that direction; and / or, If the touch operation corresponding to the physical button is a single click, a touch event is generated at the virtual touch point based on the type of the single click operation, and the touch event is reported to the target application; and / or, If the touch operation corresponding to the physical button is a swipe operation, a touch swipe event is generated based on the type of the swipe operation, and the touch swipe event is reported to the target application.
7. The method for using an unadapted application on a terminal according to claim 1, characterized in that, The step of reporting the target response information of the physical key corresponding to the target application to the target application according to the preset key-value mapping relationship of the target application includes: Obtain the identification information of the target application; Based on the identification information, query the target response information of the target application corresponding to the physical button from the key-value mapping relationship; Report the target response information to the target application.
8. A device for using an uncompatible application on a terminal, characterized in that, Includes a unit for performing the method as described in any one of claims 1-7.
9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-7.