Carplay connection method, apparatus, device, and storage medium
By establishing an IAP session on the vehicle's infotainment system and combining it with a state machine pattern to determine the device list and receive CarPlayAvailability, the compatibility issues between new and old CarPlay connection methods are resolved, ensuring that connection performance is not affected.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-03
- Publication Date
- 2026-03-20
AI Technical Summary
How to ensure compatibility with both old and new CarPlay connection methods on the in-vehicle infotainment system, while meeting Apple's certification requirements and without affecting connection performance.
By establishing an IAP session with the access device, it determines whether the device is in a pre-established list. If not, it receives CarPlayAvailability within a set time. If it receives it, it establishes a connection based on the IAP session. Otherwise, it establishes a connection based on Bonjour to discover the device and uses a state machine pattern to achieve compatibility.
It achieves CarPlay compatibility with both new and old connection methods on the vehicle's infotainment system without affecting connection performance, thus improving connection efficiency and compatibility.
Smart Images

Figure CN115968057B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a CarPlay connection method, device, equipment, and storage medium. Background Technology
[0002] CarPlay is one of the car infotainment features. Before Apple released the R16 plugin, the Bonjour service was an essential part of the CarPlay connection process. However, the Bonjour service code was complex, making debugging and modification difficult for non-professionals. Therefore, Apple released the R16 plugin in 2021. This version completely abandoned Bonjour, replacing it with IAP sessions, significantly reducing the development and maintenance complexity of CarPlay.
[0003] While the R16 plugin supports the new connection method, this new method is only supported on iOS 14 and above. For in-vehicle infotainment systems, compatibility with various iOS versions is essential. Therefore, ensuring compatibility between the old and new connection methods and meeting Apple's certification requirements for connection performance will be a major challenge for CarPlay development on in-vehicle systems. Summary of the Invention
[0004] This application provides a CarPlay connection method, apparatus, device, and storage medium, which can be used to make CarPlay on the vehicle's infotainment system compatible with both new and old connection methods, without affecting CarPlay's connection performance. The technical solution is as follows:
[0005] On one hand, embodiments of this application provide a CarPlay connection method applied to an in-vehicle terminal, the method comprising:
[0006] Establish an IAP session with the target device; the target device is a device that supports CarPlay connectivity.
[0007] Determine whether the target device is in a pre-established device list;
[0008] In response to the target device not being in the device list, determine whether CarPlayAvailability is received within a set time period;
[0009] If CarPlayAvailability is received within a set time period, a CarPlay connection with the target device is established based on the IAP session;
[0010] If CarPlayAvailability is not received within a set time period, a CarPlay connection is established with the target device based on the pre-loaded Bonjour device discovery.
[0011] On the other hand, embodiments of this application provide a CarPlay connectivity device for use in an in-vehicle terminal, the device comprising:
[0012] The IAP session establishment module is used to establish an IAP session with the target device being accessed; the target device is a device that supports CarPlay connection.
[0013] The target device determination module is used to determine whether the target device is in a pre-established device list;
[0014] The CarPlayAvailability determination module is used to determine whether CarPlayAvailability is received within a set time period in response to the target device not being in the device list.
[0015] The first CarPlay connection establishment module is used to establish a CarPlay connection with the target device based on the IAP session when CarPlayAvailability is received within a set time period.
[0016] The second CarPlay connection establishment module is used to establish a CarPlay connection with the target device based on the pre-loaded Bonjour device discovery if CarPlayAvailability is not received within a set time period.
[0017] In another aspect, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the methods described above.
[0018] In another aspect, embodiments of this application provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the methods described above.
[0019] In another aspect, embodiments of this application provide a computer program product that, when executed, performs the methods described above.
[0020] In the technical solution provided in this application embodiment, an IAP session is established with the target device, which is a device that supports CarPlay connection. It is determined whether the target device is in a pre-established device list. If the target device is not in the device list, it is determined whether CarPlayAvailability is received within a set time period. If CarPlayAvailability is received within the set time period, a CarPlay connection is established with the target device based on the IAP session. If CarPlayAvailability is not received within the set time period, a CarPlay connection is established with the target device based on the pre-loaded Bonjour device discovery mechanism. This application embodiment, by combining a pre-established device list and a state machine pattern (i.e., a defined sequence of device connection and CarPlayAvailability notifications), achieves the goal of making CarPlay on the vehicle's infotainment system compatible with both old and new connection methods without affecting CarPlay's connection performance. Attached Figure Description
[0021] Figure 1 A flowchart illustrating the steps of a CarPlay connection method provided in one embodiment of this application;
[0022] Figure 2 A schematic diagram illustrating the state transition of the CarPlay old and new connection state machine according to an embodiment of this application;
[0023] Figure 3 A schematic diagram of wired CarPlay connection timing provided for one embodiment of this application;
[0024] Figure 4 A schematic diagram of the structure of a CarPlay connectivity device provided in one embodiment of this application;
[0025] Figure 5 This is a structural block diagram of a computer device provided in one embodiment of this application. Detailed Implementation
[0026] The embodiments of this application will now be described in further detail with reference to the accompanying drawings.
[0027] Please refer to Figure 1 The diagram illustrates a flowchart of a CarPlay connectivity method according to an embodiment of this application. This method can be applied to an in-vehicle terminal. The method may include the following steps:
[0028] Step 101: Establish an IAP session with the target device; the target device is a device that supports CarPlay connection.
[0029] The embodiment of the present application can be applied to a vehicle terminal, i.e., the execution subject is a vehicle terminal.
[0030] The embodiment of the present application can enable the vehicle terminal to support a CarPlay new connection mode and a CarPlay old connection mode, wherein,
[0031] The CarPlay new connection mode is that the Apple R16 plug-in supports a connection mode in which Bonjour interaction is changed to iap interaction, and no Bonjour is involved in the connection process.
[0032] The CarPlay old connection mode is that the plug-in before the Apple R16 supports a connection mode in which only Bonjour interaction is supported, and Bonjour is involved in the connection process.
[0033] The target device is an iOS system installed device supporting CarPlay connection, and in the present example, the target device can be an iOS system installed mobile phone, iPad, iPod and the like, and specifically, the specific type of the target device can be determined according to business requirements, which is not limited in the embodiment.
[0034] In a specific implementation, after the target device accesses the vehicle terminal, it can be first judged whether the device supports CarPlay connection, and if so, the master-slave switching operation is performed, and after the master-slave switching operation is completed, the process of establishing an Iap session connection is performed. The implementation process can be described in detail in combination with the following specific implementation mode.
[0035] In a specific implementation of the present application, before the above step 101, steps A1 and A2 can also be included.
[0036] Step A1: After detecting that the target device accesses, it is determined whether the target device supports CarPlay connection.
[0037] In the embodiment, the vehicle terminal can detect whether there is an access device by detecting the voltage signal at the device access interface.
[0038] After detecting that the target device accesses, it can be first judged whether the target device supports CarPlay connection, and specifically, the judgment mode can be that the vehicle terminal sends a CarPlay connection command to the target device, and obtains the response message of the target device, and through the response message, it can be judged whether the target device supports CarPlay connection.
[0039] After it is determined that the target device does not support CarPlay connection, subsequent operations are not required, and normal data transmission and reception can be performed.
[0040] After determining that the target device supports CarPlay connection, step A2 is performed.
[0041] Step A2: performing role switch operation on the target device in the case that it is determined that the target device supports CarPlay connection.
[0042] After determining that the target device supports CarPlay connection, role switch operation can be performed on the target device (i.e. role switch), and after the completion of the role switch, step 101 described above can be performed.
[0043] After the completion of the role switch, Iap session with the target device can be established.
[0044] After establishing the Iap session with the target device, step 102 is performed.
[0045] Step 102: determining whether the target device is in a pre-established device list.
[0046] The device list refers to a pre-established list for storing information of devices that do not support CarPlay connection through Iap session. In the present example, the USB serial number and / or Bluetooth address of the device that does not support CarPlay connection through Iap session is stored in the device list.
[0047] After establishing the Iap session with the target device, it can be further determined whether the target device is in the pre-established device list. Specifically, the USB serial number of the target device or the Bluetooth address of the target device can be acquired to determine whether the USB serial number of the target device or the Bluetooth address of the target device is in the device list. Specifically, the implementation process can be described in detail in combination with the specific implementation mode described below.
[0048] In a specific implementation mode of the present application, step 102 described above can include:
[0049] Sub-step B1: acquiring the USB serial number corresponding to the target device, and determining whether the target device is in the device list according to the USB serial number.
[0050] In the present embodiment, when the connection mode of the target device and the vehicle-mounted terminal is a wired connection mode, the USB serial number of the target device can be acquired, and whether the target device is in the device list can be determined according to the USB serial number of the target device. Specifically, it is queried in the device list whether there is a USB serial number identical to the USB serial number of the target device, and if there is, it indicates that the target device is in the device list. Otherwise, it indicates that the target device is not in the device list.
[0051] Sub-step B2: Obtain the Bluetooth address corresponding to the target device, and determine whether the target device is in the device list according to the Bluetooth address.
[0052] When the connection mode of the target device and the vehicle terminal is a wireless connection mode, the Bluetooth address of the target device can be obtained, and it is determined whether the target device is in the device list according to the Bluetooth address of the target device. Specifically, it is determined whether there is a Bluetooth address identical to the Bluetooth address of the target device in the device list. If there is, it indicates that the target device is in the device list. Otherwise, it indicates that the target device is not in the device list.
[0053] After it is determined that the target device is in the device list, the CarPlay connection with the target device can be established based on the Bonjour discovery device. Specifically, when it is determined that the target device is in the device list, the CarPlay connection with the target device can be established based on the Bonjour discovery device loaded in the vehicle terminal in advance, that is, the vehicle terminal waits for the notification of the Bonjour discovery device, and then calls the start interface of the Apple plug-in to initiate the CarPlay connection.
[0054] After it is determined that the target device is not in the device list, step 103 is performed.
[0055] Step 103: In response to the target device not being in the device list, it is determined whether CarPlayAvailability is received within a set time length.
[0056] The set time length refers to a time length set in advance for determining whether CarPlayAvailability is received. In the present example, the set time length can be 3s, etc. Specifically, the specific value of the set time length can be determined according to business requirements, and the present embodiment does not limit this.
[0057] After it is determined that the target device is not in the device list, it can be determined whether CarPlayAvailability is received within a set time length in response to the target device not being in the device list.
[0058] In a specific implementation, after it is determined that the target device is not in the device list, a timer can be started to start timing, and it is determined whether CarPlayAvailability is received within a time period from the start time of the timing to the set time length.
[0059] If CarPlayAvailability is received within the set time length, step 104 is performed.
[0060] If CarPlayAvailability is not received within the set time length, step 105 is performed.
[0061] In the case that CarPlayAvailability is received within the set time length, step 104 is performed to establish the CarPlay connection with the target device based on the Iap session.
[0062] In the case that CarPlayAvailability is received within the set time length, the CarPlay connection with the target device can be established based on the Iap session. Specifically, the start interface of the preset plug-in (i.e., the Apple plug-in) can be called, and the CarPlayStartSession notification message can be sent to the target device through the Iap session to establish the CarPlay connection with the target device. Specifically, after the CarPlayStartSession notification message is sent by the vehicle terminal to the target device, the CarPlay connection with the target device can be established after the target device responds to the CarPlayStartSession notification message.
[0063] In the case that CarPlayAvailability is not received within the set time length, step 105 is performed to establish the CarPlay connection with the target device based on the preloaded Bonjour discovery device.
[0064] In the case that CarPlayAvailability is not received within the set time length, the CarPlay connection with the target device can be established based on the preloaded Bonjour discovery device. Specifically, the vehicle terminal waits for the notification message sent by the Bonjour discovery device, and then, in response to the notification message, the start interface of the Apple plug-in can be called to send the CarPlay connection message to the target device to establish the CarPlay connection with the target device.
[0065] In this embodiment, after it is determined whether CarPlayAvailability is received within the set time length, the target device can also be added to the device list. The implementation process can be described in detail in combination with the specific implementation manners described below.
[0066] In one specific implementation manner of the present application, after step 103, the following step can also be included.
[0067] In the case that CarPlayAvailability is not received within the set time length, step C1 is performed to obtain the USB serial number or the Bluetooth address corresponding to the target device.
[0068] In the embodiment, in the case that the CarPlayAvailability is not received within the set time length, the USB serial number of the target device or the Bluetooth address of the target device can be acquired.
[0069] In a specific implementation, when the connection mode of the target device and the vehicle-mounted terminal is a wired connection mode, the USB serial number of the target device can be acquired.
[0070] When the connection mode of the target device and the vehicle-mounted terminal is a wireless connection mode, the Bluetooth address of the target device can be acquired.
[0071] After the USB serial number of the target device or the Bluetooth address of the target device is acquired, step C2 is performed.
[0072] Step C2: adding the USB serial number or the Bluetooth address to the device list.
[0073] After the USB serial number of the target device or the Bluetooth address of the target device is acquired, the USB serial number of the target device or the Bluetooth address of the target device can be added to the device list.
[0074] The embodiment of the application can accelerate the connection speed of the target device in the next connection by saving the devices supporting the old connection mode (i.e., the Bonjour discovery device connection mode) in the device list.
[0075] In actual application, the devices not supporting the new connection mode are saved in the device list to accelerate the connection of the devices by judging whether the devices support the new connection mode according to whether the devices notify the CarPlayAvailability. However, due to the complex timing sequence of the CarPlay connection, the timing sequence of the device connection and the device notifying the CarPlayAvailability cannot be guaranteed, and the state machine mode is used. The above scheme provided by the embodiment of the application can make the CarPlay of the vehicle-mounted terminal compatible with the new and old connection modes (i.e., the Iap session connection mode and the Bonjour discovery device connection mode) by judging which CarPlay connection mode is used to establish the CarPlay connection with the target device according to the defined timing sequence (i.e., the state machine mode), and does not affect the connection performance of the CarPlay.
[0076] The flow of the state switching in the state machine mode can be as shown in Figure 2
[0077] Referring to Figure 2 , a schematic diagram of the state switching of the CarPlay new and old connection state machine provided by an embodiment of the application is shown. As shown in Figure 2 As shown, the initial state is Idle. Upon receiving a device connection signal, it switches to a double-checked state. When entering the double-checked state, it checks if the currently connected device has already sent a CarPlayAvailability signal. If so, it switches to the new connection state. Otherwise, it checks if the currently connected device already exists in the local device list. If it does, it switches to the old connection state; otherwise, it starts a 3-second timer. After entering the double-checked state, if a CarPlayAvailability signal is received from the device, it switches to the new connection state. If no CarPlayAvailability signal is received after the 3-second timeout, it switches back to the old connection state.
[0078] After entering the old connection state, wait for Bonjour's device discovery notification. If a notification is received, call the Apple plugin's start interface to initiate a connection.
[0079] After entering a new connection state, you can call the start interface of the Apple plugin and send a CarPlayStartSession notification to the device through the IAP session to initiate the connection.
[0080] The implementation process of solving the compatibility problem of old and new CarPlay connection methods on the vehicle terminal by combining the state machine pattern of the device list provided in this embodiment can be combined with... Figure 3 The following is a detailed description.
[0081] Reference Figure 3 This is a schematic diagram of the wired CarPlay connection timing provided in one embodiment of this application.
[0082] like Figure 3 As shown, the first stage is as follows: 1.1. The iOS device connects to the vehicle terminal; 1.2. Check if the iOS device supports CarPlay(); 1.3. If the iOS device supports CarPlay(), establish an IAP session with the iOS device; 1.4. Check if the iOS device is in the local device list.
[0083] The second stage: If the iOS device is in the local device list, the connection to the iOS device can be established by calling the start interface of the Apple CarPlay plugin based on Bonjour to discover the device.
[0084] Third stage: If the iOS device is not in the local device list, start the 3s (i.e., the set duration in this example) timer.
[0085] The fourth stage: receiving the CarPlayAvailability before the timer out, informing the CarPlayAvailability, and then establishing the CarPlay connection with the iOS device based on the Iap session, specifically, sending the CarPlayStartSession notification message to the iOS device, and then establishing the CarPlay connection with the iOS device after the iOS device responds to the CarPlayStartSession notification message. Thus, the CarPlay session establishment is completed.
[0086] The fifth stage: detecting the iOS device connection after not receiving the CarPlayAvailability before the timer out, and then establishing the CarPlay connection with the iOS device based on the Bonjour discovery device. Specifically, waiting for the notification message sent by the Bonjour discovery device, and then sending the CarPlay connection message to the iOS device to establish the CarPlay connection with the iOS device by calling the start interface of the Apple plug-in in response to the notification message. Meanwhile, the iOS device is saved to the local device list, and thus the CarPlay session establishment is completed.
[0087] Experiments show that the CarPlay connection method provided in the embodiments of the present application can determine whether the target device is in the pre-established device list by establishing an Iap session with the accessed target device, which is a device supporting the CarPlay connection, and determine whether the CarPlayAvailability is received within a set time period in response to the target device not being in the device list. In the case that the CarPlayAvailability is received within the set time period, the CarPlay connection with the target device is established based on the Iap session. In the case that the CarPlayAvailability is not received within the set time period, the CarPlay connection with the target device is established based on the pre-loaded Bonjour discovery device. The embodiments of the present application can achieve the purpose of making the CarPlay of the vehicle terminal compatible with the new and old connection methods while not affecting the connection performance of the CarPlay by combining the pre-established device list and the state machine mode (i.e., the defined device connection and device notification CarPlayAvailability timing).
[0088] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, please refer to the method embodiments of the present application.
[0089] Please refer to Figure 4Fig. 4 shows a block diagram of a CarPlay connection apparatus according to an embodiment of the present application. The apparatus has the functions of the above-mentioned method examples, which can be implemented by hardware or by corresponding software executed by hardware. The apparatus 400 can include an Iap session establishing module 410, a target device determining module 420, a CarPlayAvailability determining module 430, a first CarPlay connection establishing module 440, and a second CarPlay connection establishing module 450.
[0090] The Iap session establishing module 410 is configured to establish an Iap session with an accessed target device; the target device is a device supporting CarPlay connection;
[0091] The target device determining module 420 is configured to determine whether the target device is in a pre-established device list;
[0092] The CarPlayAvailability determining module 430 is configured to, in response to the target device not being in the device list, determine whether a CarPlayAvailability is received within a set time length;
[0093] The first CarPlay connection establishing module 440 is configured to, in the case that the CarPlayAvailability is received within the set time length, establish a CarPlay connection with the target device based on the Iap session;
[0094] The second CarPlay connection establishing module 450 is configured to, in the case that the CarPlayAvailability is not received within the set time length, establish a CarPlay connection with the target device based on a pre-loaded Bonjour discovered device.
[0095] To sum up, in the technical scheme provided by the embodiments of the present application, an Iap session is established with an accessed target device, the target device is a device supporting CarPlay connection, it is determined whether the target device is in a pre-established device list, and in response to the target device not being in the device list, it is determined whether CarPlayAvailability is received within a set time length. In the case where CarPlayAvailability is received within the set time length, CarPlay connection is established with the target device based on the Iap session. In the case where CarPlayAvailability is not received within the set time length, CarPlay connection is established with the target device based on a pre-loaded Bonjour discovered device. The embodiments of the present application can achieve the purpose of making the CarPlay of the vehicle terminal compatible with new and old connection methods while not affecting the connection performance of CarPlay by combining the pre-established device list and the state machine mode (i.e., the defined device connection and device notification CarPlayAvailability timing).
[0096] In a specific implementation of the present application, the apparatus further comprises:
[0097] a CarPlay connection determination module configured to determine whether the target device supports CarPlay connection after detecting that the target device is accessed;
[0098] a master-slave switching execution module configured to perform a master-slave switching operation on the target device in the case where it is determined that the target device supports CarPlay connection.
[0099] In another specific implementation of the present application, the target device determination module comprises:
[0100] a first device determination unit configured to obtain a USB serial number corresponding to the target device, and determine whether the target device is in the device list according to the USB serial number;
[0101] a second device determination unit configured to obtain a Bluetooth address corresponding to the target device, and determine whether the target device is in the device list according to the Bluetooth address.
[0102] In another specific implementation of the present application, the apparatus further comprises:
[0103] a third CarPlay connection establishment module configured to establish CarPlay connection with the target device based on the Bonjour discovered device in the case where the target device is in the device list.
[0104] In another specific implementation of the present application, the first CarPlay connection establishment module comprises:
[0105] The first CarPlay connection establishing unit is configured to call a start interface of the preset plug-in, and send a CarPlayStartSession notification message to the target device through the Iap session to establish a CarPlay connection with the target device.
[0106] In another specific implementation of the present application, the second CarPlay connection establishing module comprises:
[0107] The notification message receiving unit is configured to receive a notification message sent by the Bonjour discovery device;
[0108] The second CarPlay connection establishing unit is configured to, in response to the notification message, call a start interface of the preset plug-in to send a CarPlay connection message to the target device to establish a CarPlay connection with the target device.
[0109] In another specific implementation of the present application, the apparatus further comprises:
[0110] The device information obtaining module is configured to, in the case that no CarPlayAvailability is received within a set time length, obtain a USB serial number or a Bluetooth address corresponding to the target device;
[0111] The device information adding module is configured to add the USB serial number or the Bluetooth address to the device list.
[0112] It should be noted that the apparatus provided in the above embodiments, in realizing its functions, only takes the above-mentioned division of each functional module as an example for illustration, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above-described functions. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0113] Please refer to Figure 5 which shows a structural block diagram of a computer device provided in an embodiment of the present application. The computer device can be used to implement the CarPlay connection method provided in the above embodiments. The computer device can be a PC or a server, or other devices with data processing and storage capabilities. Specifically:
[0114] The computer device 500 includes a central processing unit (CPU) 501, a system memory 504 including random access memory (RAM) 502 and read-only memory (ROM) 503, and a system bus 505 connecting the system memory 504 and the CPU 501. The computer device 500 also includes a basic input / output system (I / O system) 506 that facilitates information transfer between various devices within the computer, and a mass storage device 507 for storing the operating system 513, application programs 514, and other program modules 515.
[0115] The basic input / output system 506 includes a display 508 for displaying information and an input device 509 for user input, such as a mouse or keyboard. Both the display 508 and the input device 509 are connected to the central processing unit 501 via an input / output controller 510 connected to the system bus 505. The basic input / output system 506 may also include the input / output controller 510 for receiving and processing input from multiple other devices such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 510 also provides output to a display screen, printer, or other types of output devices.
[0116] The mass storage device 507 is connected to the central processing unit 501 via a mass storage controller (not shown) connected to the system bus 505. The mass storage device 507 and its associated computer-readable media provide non-volatile storage for the computer device 500. That is, the mass storage device 507 may include computer-readable media (not shown) such as a hard disk or a CD-ROM drive.
[0117] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storage technologies, CD-ROM, DVD or other optical storage, magnetic tape cassettes, magnetic tape, disk storage, or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage media are not limited to the above-mentioned types. The system memory 504 and mass storage device 507 described above can be collectively referred to as memory.
[0118] According to various embodiments of this application, the computer device 500 can also be connected to a remote computer on a network, such as the Internet. That is, the computer device 500 can be connected to a network 512 via a network interface unit 511 connected to the system bus 505, or the network interface unit 511 can be used to connect to other types of networks or remote computer systems (not shown).
[0119] The memory also includes one or more programs stored in the memory and configured to be executed by one or more processors. These programs contain instructions for performing the CarPlay connectivity method described above.
[0120] In one example embodiment, a computer device is also provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, at least one program, code set, or instruction set is configured to be executed by one or more processors to implement the CarPlay connectivity method described above.
[0121] In an exemplary embodiment, a computer-readable storage medium is also provided, the storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set implements the CarPlay connection method described above when executed by a processor of a computer device.
[0122] Optionally, the aforementioned computer-readable storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0123] In an exemplary embodiment, a computer program product is also provided, which, when executed, is used to implement the CarPlay connection method described above.
[0124] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0125] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A CarPlay connection method, applied to an in-vehicle terminal, characterized in that, The method includes: Establish an IAP session with the target device; the target device is a device that supports CarPlay connectivity. Determine whether the target device is in a pre-established device list; In response to the target device not being in the device list, determine whether CarPlayAvailability is received within a set time period; If CarPlayAvailability is received within a set time period, a CarPlay connection with the target device is established based on the IAP session; If CarPlayAvailability is not received within a set time period, a CarPlay connection is established with the target device based on the pre-loaded Bonjour device discovery.
2. The method according to claim 1, characterized in that, Before establishing the IAP session with the target device for access, the following is also included: After detecting that the target device is connected, determine whether the target device supports CarPlay connection; If it is determined that the target device supports CarPlay connectivity, a master-slave switch operation is performed on the target device.
3. The method according to claim 1, characterized in that, Determining whether the target device is in a pre-established device list includes: Obtain the USB serial number corresponding to the target device, and determine whether the target device is in the device list based on the USB serial number; or Obtain the Bluetooth address corresponding to the target device, and determine whether the target device is in the device list based on the Bluetooth address.
4. The method according to claim 1, characterized in that, After determining whether the target device is in a pre-established device list, the process further includes: In response to the target device being in the device list, a CarPlay connection is established with the target device based on the Bonjour-discovered device.
5. The method according to claim 1, characterized in that, The establishment of a CarPlay connection with the target device based on the IAP session includes: The start interface of the pre-built plugin is invoked to send a CarPlayStartSession notification message to the target device through the IAP session in order to establish a CarPlay connection with the target device.
6. The method according to claim 1, characterized in that, The establishment of a CarPlay connection between the device and the target device based on the pre-loaded Bonjour discovery feature includes: Receive notification messages sent by the Bonjour discovery device; In response to the notification message, the start interface of the pre-built plugin is invoked to send a CarPlay connection message to the target device to establish a CarPlay connection with the target device.
7. The method according to claim 1, characterized in that, After determining whether CarPlayAvailability is received within the set time period, the following is also included: If CarPlayAvailability is not received within a set time period, obtain the USB serial number or Bluetooth address corresponding to the target device; Add the USB serial number or the Bluetooth address to the device list.
8. A CarPlay connectivity device, applied to an in-vehicle terminal, characterized in that, The device includes: The IAP session establishment module is used to establish an IAP session with the target device being accessed; the target device is a device that supports CarPlay connection. The target device determination module is used to determine whether the target device is in a pre-established device list; The CarPlayAvailability determination module is used to determine whether CarPlayAvailability is received within a set time period in response to the target device not being in the device list. The first CarPlay connection establishment module is used to establish a CarPlay connection with the target device based on the IAP session when CarPlayAvailability is received within a set time period. The second CarPlay connection establishment module is used to establish a CarPlay connection with the target device based on the pre-loaded Bonjour device discovery if CarPlayAvailability is not received within a set time period.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, a code set, or an instruction set, the at least one instruction, the at least one program, the code set, or the instruction set being loaded and executed by the processor to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for finding TV based on Bonjour to perform screen projection and mobile terminal
CN106210821A
Method for putting audios and videos into vehicle machine through agent program
CN111246267A