A Bluetooth startup method, apparatus, device, and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]本发明实施例提供一种蓝牙启动方法、装置、设备及存储介质,解决了由于各个项目需使用不同的方式实现蓝牙功能导致车机蓝牙对设置APK依赖性强,且不能适配于不同的车机项目的问题
Smart Images

Figure CN115934193B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a Bluetooth startup method, apparatus, device and storage medium. Background Technology
[0002] Currently, there are many different designs for in-vehicle Bluetooth systems. The UI design varies from project to project. It may be a standalone application, a simplified independent window, or placed in a sub-interface of another application. Each project needs to use different methods to implement Bluetooth functionality, resulting in a strong dependence of in-vehicle Bluetooth on the APK settings and an inability to adapt to different in-vehicle projects. Summary of the Invention
[0003] This invention provides a Bluetooth startup method, apparatus, device, and storage medium, which solves the problem that vehicle-mounted Bluetooth is highly dependent on the APK settings and cannot be adapted to different vehicle-mounted system projects because different projects need to use different methods to implement Bluetooth functions.
[0004] According to one aspect of the present invention, a Bluetooth startup method is provided, comprising:
[0005] Retrieve the first identifier information from the target plugin corresponding to the target icon;
[0006] The target Activity is determined based on the first identification information;
[0007] Locate the Bluetooth launch function in the target Activity and execute the Bluetooth launch function.
[0008] Furthermore, executing the Bluetooth startup function includes:
[0009] Obtain the first object of the host APK and the second object of the plugin APK;
[0010] Bluetooth initialization is performed based on the first object of the host APK;
[0011] The Bluetooth display information is obtained from the second object of the plugin APK and then displayed.
[0012] Furthermore, Bluetooth display information is obtained from the second object of the plugin APK, and the Bluetooth display information is displayed, including:
[0013] The target human-machine interface is determined based on the first object of the host APK;
[0014] The second object of the plugin APK obtains Bluetooth display information through the target human-machine interface, generates a target interface based on the target human-machine interface and the Bluetooth display information, and displays the target interface.
[0015] Furthermore, generating a target interface based on the target human-machine interface and the Bluetooth display information, and displaying the target interface, includes:
[0016] Obtain the display template corresponding to the target human-machine interface;
[0017] A target interface is generated based on the display template and the Bluetooth display information, and then the target interface is displayed.
[0018] Furthermore, obtain the first identifier information in the target plugin corresponding to the target icon, including:
[0019] Obtain the target plugin and target address information corresponding to the target icon;
[0020] The first identification information in the target plugin is obtained based on the target address information.
[0021] According to another aspect of the present invention, a Bluetooth startup device is provided, the Bluetooth startup device comprising:
[0022] The acquisition module is used to obtain the first identification information in the target plugin corresponding to the target icon;
[0023] The determination module is used to determine the target Activity based on the first identification information;
[0024] The execution module is used to locate the Bluetooth launch function in the target Activity and execute the Bluetooth launch function.
[0025] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0026] At least one processor; and
[0027] A memory communicatively connected to the at least one processor; wherein,
[0028] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the Bluetooth startup method according to any embodiment of the present invention.
[0029] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the Bluetooth startup method according to any embodiment of the present invention.
[0030] This invention solves the problem that vehicle infotainment Bluetooth relies heavily on the setting APK and cannot be adapted to different vehicle infotainment projects because different projects need to use different methods to implement Bluetooth functions. By obtaining the first identification information in the target plugin corresponding to the target icon; determining the target Activity based on the first identification information; finding the Bluetooth startup function in the target Activity; and executing the Bluetooth startup function, this invention can get rid of the dependence on the setting APK, improve response speed, and enhance adaptability and interactivity.
[0031] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0032] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 This is a flowchart of a Bluetooth startup method according to Embodiment 1 of the present invention;
[0034] Figure 2 This is a schematic diagram of the structure of a Bluetooth startup device according to Embodiment 2 of the present invention;
[0035] Figure 3 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0036] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0038] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0039] Example 1
[0040] Figure 1 This is a flowchart of a Bluetooth startup method according to Embodiment 1 of the present invention. This embodiment is applicable to Bluetooth startup scenarios in different projects. The method can be executed by the Bluetooth startup device in this embodiment, which can be implemented in software and / or hardware, such as... Figure 1 As shown, the method specifically includes the following steps:
[0041] S110, retrieve the first identifier information in the target plugin corresponding to the target icon.
[0042] The target icon can be a Bluetooth icon from different projects. The target plugin can be a Bluetooth plugin already stored in the system ROM. The first identification information can be the action identification information representing the Activity defined in the target plugin.
[0043] Specifically, the method for obtaining the first identifier information in the target plugin corresponding to the target icon can be as follows: obtain the target icon, the host APK obtains the target plugin according to the system plugin loader, and obtains the first identifier information in the target plugin. The host APK has an independent process, and after the target plugin is mounted, the target plugin's process belongs to the host APK.
[0044] Optionally, obtain the first identifier information in the target plugin corresponding to the target icon, including:
[0045] Obtain the target plugin and target address information corresponding to the target icon;
[0046] The first identification information in the target plugin is obtained based on the target address information.
[0047] The target address information is the address information of the first identifier information in the target plugin.
[0048] Specifically, the method for obtaining the target plugin and target address information corresponding to the target icon can be as follows: the host APK obtains the target plugin corresponding to the target icon, and at the same time obtains the target address information where the first identifier information defined in the target plugin is located.
[0049] Specifically, the method for obtaining the first identifier information in the target plugin based on the target address information can be as follows: the host APK obtains the first identifier information in the target plugin based on the obtained target address information. For example, the plugin APK can define a specific action identifier information in AndroidManifest.xml and inform the host APK of the specific address information of the action identifier information defined therein. The host APK then obtains the action identifier information based on the specific address information of the action.
[0050] Optionally, obtaining the target plugin corresponding to the target icon includes:
[0051] Get the plugin list;
[0052] Search the plugin list to obtain the target plugin corresponding to the target icon.
[0053] The plugin list can be a list of plugins used by applications in the system ROM.
[0054] Specifically, the plugin list can be obtained by having the host APK use a plugin loader to obtain the plugin list of applications used in the system ROM.
[0055] Specifically, the method for finding the target plugin corresponding to the target icon in the plugin list can be as follows: The host APK can obtain the target plugin corresponding to the target icon by querying the plugin list and using the identification information of the target plugin corresponding to the target icon. For example, if the identification information of the target plugin corresponding to the Bluetooth icon is the XCBluetoothPlugin plugin, then the host APK queries the plugin list to obtain the XCBluetoothPlugin plugin.
[0056] By implementing Bluetooth as a plugin that can be loaded by a third party, all Bluetooth functions are encapsulated within a single plugin, achieving Bluetooth plug-inization. This eliminates the dependence on a settings APK, allowing for more independent upgrades and releases of Bluetooth functionality. Furthermore, Bluetooth plug-inization can optimize response speed. For example, if Bluetooth functionality is implemented using a settings APK, the response time can reach 6-8 seconds; with Bluetooth plug-inization, the response time can be reduced to less than 0.5 seconds.
[0057] S120, determine the target Activity based on the first identification information.
[0058] In the target Activity, a series of methods that return a view can be defined.
[0059] Specifically, the method for determining the target Activity based on the first identification information can be as follows: after obtaining the first identification information, the host APK determines the target Activity corresponding to the first identification information based on the first identification information.
[0060] S130, Locate the Bluetooth startup function in the target Activity and execute the Bluetooth startup function.
[0061] The Bluetooth startup function can be `getXXXBluetoothView()`. After obtaining the target Activity, all methods that return views defined in the target Activity need to be exposed to the host APK using the form `getXXXBluetoothView(ApplicationContext, PluginContext)`. For example, after obtaining the XCBluetoothPlugin plugin, the Bluetooth view, when implementing different versions of HMI in different projects, can uniformly be exposed to the host APK using the form `getXCBluetoothView(Context1, Context2)`, where Context1 represents the ApplicationContext and Context2 represents the PluginContext.
[0062] Specifically, the method for finding and executing the Bluetooth startup function in the target Activity can be as follows: After the host APK obtains the target Activity, it then uses reflection to call the Bluetooth startup function getXXXBluetoothView(ApplicationContext, PluginContext) to obtain all the methods that return views in the target Activity, and executes this Bluetooth startup function to start the Bluetooth function.
[0063] Optionally, the Bluetooth startup function is executed, including:
[0064] Obtain the first object of the host APK and the second object of the plugin APK;
[0065] Bluetooth initialization is performed based on the first object of the host APK;
[0066] The Bluetooth display information is obtained from the second object of the plugin APK and then displayed.
[0067] The first object of the host APK is the ApplicationContext object in the Bluetooth startup function getXXXBluetoothView(ApplicationContext, PluginContext), which can be used to initialize the Bluetooth Lib library; the second object of the plugin APK is the PluginContext object in the Bluetooth startup function getXXXBluetoothView(ApplicationContext, PluginContext), which is used to obtain local resources.
[0068] It should be noted that when defining a series of methods that return a view in the target Activity of the plugin APK, it is generally necessary to pass in two objects: ApplicationContext and PluginContext. This is because the Bluetooth process is mounted in the host APK, Bluetooth initialization requires the use of the host APK's ApplicationContext object, and the plugin APK's PluginContext object is needed when acquiring local resources and loading text and image resources in the plugin APK.
[0069] The Bluetooth display information can include the Bluetooth pop-up style, Bluetooth startup wizard style, and Bluetooth settings style defined in the Bluetooth view.
[0070] Specifically, the way to obtain the first object of the host APK and the second object of the plugin APK is as follows: When the host APK executes the Bluetooth startup function, it needs to pass in the ApplicationContext object and the PluginContext object that call the Bluetooth startup function. The ApplicationContext object is the first object of the host APK, and the PluginContext object is the second object of the plugin APK.
[0071] Specifically, the method for initializing Bluetooth based on the first object of the host APK can be: initializing the Bluetooth Lib library based on the ApplicationContext object of the host APK.
[0072] Specifically, the method for obtaining and displaying Bluetooth display information based on the second object of the plugin APK can be as follows: loading the Bluetooth-related display information set in the Bluetooth view based on the PluginContext object of the plugin APK, and then displaying the Bluetooth display information.
[0073] It should be noted that if the Bluetooth view depends on external systems and requires a third party to implement it, but the core code in the Bluetooth library needs to be hidden, then a dynamic Bluetooth library approach can be used. For example, an SDK or JAR file can be added to correspond to the interface in the library, and the interface in the SDK can be provided to the third party for use. The implementation of the interface in the SDK calls the Bluetooth interface in the Bluetooth plugin via reflection. Therefore, the changes made by the third party and the changes made to Bluetooth are decoupled, achieving the effect of a dynamic library.
[0074] Optionally, Bluetooth display information is obtained from the second object of the plugin APK and displayed, including:
[0075] The target human-machine interface is determined based on the first object of the host APK;
[0076] The second object of the plugin APK obtains Bluetooth display information through the target human-machine interface, generates a target interface based on the target human-machine interface and the Bluetooth display information, and displays the target interface.
[0077] The target human-machine interface can be the target interface determined during the initialization of the Bluetooth Lib library based on the first object of the host APK. The Bluetooth Lib library can call the target human-machine interface to return Bluetooth display information in the Bluetooth view. Specifically, the initialization of Bluetooth Lib includes the initialization of Bluetooth functions, such as Bluetooth turning on, off, scanning, pairing, or connecting logic functions. While initializing Bluetooth functions, the related APIs are unified into a single calling interface, namely the target human-machine interface.
[0078] The target interface can be the interface generated based on the Bluetooth display information in the Bluetooth view after the Bluetooth Lib library initialization and Bluetooth function initialization are implemented.
[0079] Specifically, the method for determining the target human-machine interface based on the first object of the host APK can be as follows: when initializing the Bluetooth function based on the first object of the host APK, the relevant API interfaces are uniformly determined as a single calling interface, i.e., the target human-machine interface.
[0080] Specifically, the second object of the plugin APK obtains Bluetooth display information through the target human-machine interface, and generates a target interface based on the target human-machine interface and the Bluetooth display information. The target interface can be displayed as follows: after obtaining the target human-machine interface, the target human-machine interface is provided to BluetoothLib for use. BluetoothLib calls the target human-machine interface and uses the second object of the plugin APK to load the Bluetooth display information in the Bluetooth view. After obtaining the Bluetooth display information in the Bluetooth view, the plugin APK generates the corresponding Bluetooth display interface based on the Bluetooth display information and displays this interface in the container specified by the host APK.
[0081] It should be noted that different versions need to be adapted during the initialization of Bluetooth Lib and Bluetooth function to ensure compatibility with different vehicle systems. Furthermore, the Bluetooth Lib layer currently supports up to Android 11, and future upgrades will allow for different processes to be controlled based on the Android version.
[0082] Optionally, a target interface is generated based on the target human-machine interface and the Bluetooth display information, and the target interface is displayed, including:
[0083] Obtain the display template corresponding to the target human-machine interface;
[0084] A target interface is generated based on the display template and the Bluetooth display information, and then the target interface is displayed.
[0085] The display template can be a display template for Bluetooth views that need to achieve different effects for different projects and different versions of HMI.
[0086] Specifically, the method for obtaining the display template corresponding to the target human-machine interface can be as follows: In the target Activity, display templates of Bluetooth views that implement different effects can be defined. BluetoothLib calls the target human-machine interface to obtain the display template in the Bluetooth view and returns it to the plugin APK.
[0087] Specifically, a target interface is generated based on the display template and the Bluetooth display information. The target interface can be displayed as follows: the plugin APK generates the corresponding target interface based on the display template and Bluetooth display information in the Bluetooth view, and displays the generated target interface in the container specified by the host APK.
[0088] The technical solution of this embodiment solves the problem that the vehicle system Bluetooth is highly dependent on the setting APK and cannot be adapted to different vehicle system projects because each project needs to use different methods to implement Bluetooth functions. This is achieved by obtaining the first identification information in the target plugin corresponding to the target icon; determining the target Activity based on the first identification information; finding the Bluetooth startup function in the target Activity; and executing the Bluetooth startup function.
[0089] Example 2
[0090] Figure 2 This is a schematic diagram of a Bluetooth startup device according to Embodiment 2 of the present invention. This embodiment is applicable to various scenarios involving Bluetooth startup. The device can be implemented using software and / or hardware, and can be integrated into any device that provides Bluetooth startup functionality, such as... Figure 2 As shown, the Bluetooth startup device specifically includes: an acquisition module 210, a determination module 220, and an execution module 230.
[0091] Among them, the acquisition module 210 is used to acquire the first identification information in the target plugin corresponding to the target icon;
[0092] The determining module 220 is used to determine the target Activity based on the first identification information;
[0093] The execution module 230 is used to locate the Bluetooth startup function in the target Activity and execute the Bluetooth startup function.
[0094] Optionally, the execution module is specifically used for:
[0095] Obtain the first object of the host APK and the second object of the plugin APK;
[0096] Bluetooth initialization is performed based on the first object of the host APK;
[0097] The Bluetooth display information is obtained from the second object of the plugin APK and then displayed.
[0098] Optionally, the execution module is specifically used for:
[0099] The target human-machine interface is determined based on the first object of the host APK;
[0100] The second object of the plugin APK obtains Bluetooth display information through the target human-machine interface, generates a target interface based on the target human-machine interface and the Bluetooth display information, and displays the target interface.
[0101] Optionally, the execution module is specifically used for:
[0102] Obtain the display template corresponding to the target human-machine interface;
[0103] A target interface is generated based on the display template and the Bluetooth display information, and then the target interface is displayed.
[0104] Optionally, the acquisition module is specifically used for:
[0105] Obtain the target plugin and target address information corresponding to the target icon;
[0106] The first identification information in the target plugin is obtained based on the target address information.
[0107] Optionally, the acquisition module is specifically used for:
[0108] Get the plugin list;
[0109] Search the plugin list to obtain the target plugin corresponding to the target icon.
[0110] The above-described products can perform the methods provided in any embodiment of the present invention, and have the corresponding functional modules and beneficial effects for performing the methods.
[0111] The technical solution of this embodiment solves the problem that the vehicle system Bluetooth is highly dependent on the setting APK and cannot be adapted to different vehicle system projects because each project needs to use different methods to implement Bluetooth functions. This is achieved by obtaining the first identification information in the target plugin corresponding to the target icon; determining the target Activity based on the first identification information; finding the Bluetooth startup function in the target Activity; and executing the Bluetooth startup function.
[0112] Example 3
[0113] Figure 3 This is a schematic diagram of an electronic device according to Embodiment 3 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0114] like Figure 3As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0115] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0116] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the Bluetooth startup method.
[0117] In some embodiments, the Bluetooth boot method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the Bluetooth boot method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the Bluetooth boot method by any other suitable means (e.g., by means of firmware).
[0118] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0119] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0120] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0121] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0122] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0123] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0124] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0125] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A Bluetooth startup method, characterized in that, include: Retrieve the first identifier information from the target plugin corresponding to the target icon; The target Activity is determined based on the first identification information; Locate the Bluetooth launch function in the target Activity and execute the Bluetooth launch function; The execution of the Bluetooth startup function includes: Obtain the first object of the host APK and the second object of the plugin APK; wherein, the first object of the host APK and the second object of the plugin APK are objects in the Bluetooth startup function, and the second object of the plugin APK obtains local resources; Bluetooth initialization is performed based on the first object of the host APK; Obtain Bluetooth display information from the second object of the plugin APK, and display the Bluetooth display information; The step of obtaining Bluetooth display information based on the second object of the plugin APK and displaying the Bluetooth display information includes: The target human-machine interface is determined based on the first object of the host APK; The second object of the plugin APK obtains Bluetooth display information through the target human-machine interface, and generates a target interface based on the target human-machine interface and the Bluetooth display information, and displays the target interface; The step of generating a target interface based on the target human-machine interface and the Bluetooth display information, and displaying the target interface, includes: Obtain the display template corresponding to the target human-machine interface; A target interface is generated based on the display template and the Bluetooth display information, and then the target interface is displayed.
2. The method according to claim 1, characterized in that, Retrieve the first identifier information from the target plugin corresponding to the target icon, including: Obtain the target plugin and target address information corresponding to the target icon; The first identification information in the target plugin is obtained based on the target address information.
3. The method according to claim 2, characterized in that, Obtaining the target plugin corresponding to the target icon includes: Get the plugin list; Search the plugin list to obtain the target plugin corresponding to the target icon.
4. A Bluetooth start-up device, characterized in that, include: The acquisition module is used to obtain the first identification information in the target plugin corresponding to the target icon; The determination module is used to determine the target Activity based on the first identification information; An execution module is used to locate the Bluetooth launch function in the target Activity and execute the Bluetooth launch function; The execution module is specifically used for: Obtain the first object of the host APK and the second object of the plugin APK; wherein, the first object of the host APK and the second object of the plugin APK are objects in the Bluetooth startup function, and the second object of the plugin APK obtains local resources; Bluetooth initialization is performed based on the first object of the host APK; Obtain Bluetooth display information from the second object of the plugin APK, and display the Bluetooth display information; The execution module is specifically used for: The target human-machine interface is determined based on the first object of the host APK; The second object of the plugin APK obtains Bluetooth display information through the target human-machine interface, and generates a target interface based on the target human-machine interface and the Bluetooth display information, and displays the target interface; The execution module is specifically used for: Obtain the display template corresponding to the target human-machine interface; A target interface is generated based on the display template and the Bluetooth display information, and then the target interface is displayed.
5. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the Bluetooth startup method according to any one of claims 1-3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the Bluetooth startup method according to any one of claims 1-3.
Citation Information
Patent Citations
Control method, electronic equipment and readable storage medium
CN114895998A