Application Display Continuing Method and Device
20230179698 ยท 2023-06-08
Inventors
Cpc classification
B60K35/00
PERFORMING OPERATIONS; TRANSPORTING
International classification
Abstract
A method is provided and applied to a terminal device. The terminal device is connected to an in-vehicle device and a first application and at least one second application run on the terminal device. The method includes: sending, by the first application, a first broadcast to the at least one second application, so that the at least one second application sends a second broadcast based on the first broadcast; receiving a second broadcast sent by the at least one second application, where the second broadcast includes first data information of the second application; generating, based on the first data information, a card corresponding to the second application, and displaying the card on the in-vehicle device; and when a user taps the card corresponding to the second application, displaying, on the in-vehicle device based on the first data information of the second application, content of the second application.
Claims
1-10. (canceled)
11. A method applied to a terminal device, wherein the terminal device comprises a first application, a second application, and a third application, and the method comprises: sending, by the first application, a first broadcast after the terminal device is connected to an in-vehicle device; sending, by the second application, first data information of the second application to the first application after receiving the first broadcast; sending, by the third application, first data information of the third application to the first application after receiving the first broadcast; generating, by the first application, a to-be-displayed interface based on the first data information of the second application and the first data of the third application, wherein the to-be-displayed interface comprises a card corresponding to the second application and a card corresponding to the third application, wherein the card of the second application is generated based on the first data information of the second application, and wherein the card of the third application is generated based on the first data information of the third application; and sending, by the terminal device, the to-be-displayed interface to the in-vehicle device for displaying.
12. The method according to claim 11, wherein the method further comprises: notifying ,by the first application, based on the card of the second application being added to the to-be-displayed interface, the second application that the card of the second application is successfully added; and notifying, by the first application, based on the card of the third application being added to the to-be-displayed interface, the third application that the card of the third application is successfully added.
13. The method according to claim 11, wherein the method further comprises: sending, by the second application, second data information of the second application to the first application; and updating, by the first application, the card of the second application according to the second data information of the second application.
14. The method according to claim 11, wherein the method further comprises: receiving, by the first application, a removal message sent by the second application; and removing, according to the removal message, the card that is of the second application and that is displayed on the in-vehicle device.
15. The method according to claim 11, wherein the method further comprises: sending, by the first application, based on the terminal device being disconnected from the in-vehicle device, a removal notification to the second application and the third application separately to notify that the card of the second application and the card of the third application are removed.
16. The method according to claim 11, wherein the method further comprises: sending, by the first application, based on the terminal device being disconnected from the in-vehicle device a second broadcast to notify the second application and the third application that a connection between the terminal device and the in-vehicle device is disconnected.
17. The method according to claim 11, wherein the first data information of the second application comprises one or more of a card identity of the card of the second application, content of the second application, a package name of the second application, a card type of the card of the second application, or a priority of the card of the second application.
18. The method according to claim 14, wherein the removal message comprises a card identity of the card of the second application.
19. The method according to claim 11, wherein the second application is a navigation application or a music playing application.
20. A terminal device comprising: a processor; a non-transitory computer-readable storage medium storing a program to be executed by the processor, the program including instructions to: send, by a first application, a first broadcast after the terminal device is connected to an in-vehicle device; send, by a second application, first data information of the second application to the first application after receiving the first broadcast; send, by a third application, first data information of the third application to the first application after receiving the first broadcast; generate, by the first application, a to-be-displayed interface based on the first data information of the second application and the first data of the third application, wherein the to-be-displayed interface comprises a card corresponding to the second application and a card corresponding to the third application, wherein the card of the second application is generated based on the first data information of the second application, and wherein the card of the third application is generated based on the first data information of the third application; and send, by the terminal device, the to-be-displayed interface to the in-vehicle device for displaying.
21. The terminal device according to claim 20, wherein the instructions further include instructions to: notify, by the first application, based on the card of the second application being added to the to-be-displayed interface, the second application that the card of the second application is successfully added; and notify, by the first application, based on the card of the third application being added to the to-be-displayed interface, the third application that the card of the third application is successfully added.
22. The terminal device according to claim 20, wherein the instructions further include instructions to : send, by the second application, second data information of the second application to the first application; and update, by the first application, the card of the second application according to the second data information of the second application.
23. The terminal device according to claim 20, wherein the instructions further include instructions to: receive, by the first application, a removal message sent by the second application; and remove, according to the removal message, the card that is of the second application and that is displayed on the in-vehicle device.
24. The terminal device according to claim 20, wherein the instructions further include instructions to: send, by the first application, based on the terminal device being disconnected from the in-vehicle device, a removal notification to the second application and the third application separately to notify that the card of the second application and the card of the third application are removed.
25. The terminal device according to claim 20, wherein the send, by the first application : send, by the first application, based on the terminal device being disconnected from the in-vehicle device, a second broadcast to notify the second application and the third application that a connection between the terminal device and the in-vehicle device is disconnected.
26. The terminal device according to claim 20, wherein the first data information of the second application comprises one or more of a card identity of the card of the second application, content of the second application, a package name of the second application, a card type of the card of the second application, or a priority of the card of the second application.
27. The terminal device according to claim 23, wherein the removal message comprises a card identity of the card of the second application.
28. The terminal device according to claim 20, wherein the second application is a navigation application or a music playing application.
29. A non-transitory computer-readable storage medium storing a program to be executed by a processor of a terminal device, the program including instructions to perform: send, by a first application, a first broadcast after the terminal device is connected to an in-vehicle device; send, by a second application, first data information of the second application to the first application after receiving the first broadcast; send, by a third application, first data information of the third application to the first application after receiving the first broadcast; generate, by the first application, a to-be-displayed interface based on the first data information of the second application and the first data of the third application, wherein the to-be-displayed interface comprises a card corresponding to the second application and a card corresponding to the third application, wherein the card of the second application is generated based on the first data information of the second application, and wherein the card of the third application is generated based on the first data information of the third application; and send, by the terminal device, the to-be-displayed interface to the in-vehicle device for displaying.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
[0039] The following describes the technical solutions in embodiments of this application with reference to the accompanying drawings in the embodiments of this application.
[0040] This application is mainly applied to a scenario in which a user uses a mobile phone when driving a vehicle, for example, a scenario shown in
[0041] In some solutions, only simple navigation continuation and call continuation are supported. However, if the navigation continuation is, for example, customized continuation for an in-vehicle screen (that is, a screen of an in-vehicle device), such customized continuation is only available for a specific application. For some other applications, because no corresponding activity (activity) life cycle is created for these APPs in an Android system, different applications need to be separately customized to perform continuation of a limited number of interfaces on the in-vehicle screen. In this case, application continuation can be implemented for only a limited number of applications in this solution. Relatively speaking, because a system of an in-vehicle device is relatively closed, continuation of various applications on a terminal device cannot be flexibly handled. In this solution, for applications that can be continued, continuation succeeds for only one single application at a time, instead of a plurality of applications, such as a music application, a navigation application, and a call application, at the same time.
[0042] That a terminal device in this application is connected to an in-vehicle device is shown in a schematic diagram of an application display continuing framework in
[0043] The continuing APP 2011 may further send an update message. For example, the update message may carry updated information of the continuing APP 2011, so that after receiving the update message, the in-vehicle APP 2012 updates information of a corresponding continuing APP 2011 on the to-be-displayed home screen based on the update message. After the continuing APP 2011 is closed, a removal message may be further sent to the in-vehicle APP 2012. The in-vehicle APP 2012 removes information of a corresponding other APP 2011 on the to-be-displayed home screen based on the received removal message. It may be understood that, after the in-vehicle device 202 is disconnected from the terminal device 201, the in-vehicle APP 2012 may stop providing the to-be-displayed home screen to the in-vehicle device. In addition to display continuation, application continuation further includes audio continuation. The audio continuation may use a continuing manner in the conventional technology.
[0044] The following describes the technical solutions in embodiments of this application with reference to the accompanying drawings in the embodiments of this application.
[0045] For ease of description, this application describes this solution in detail by using an example in which a terminal device runs an Android system. By using an Android (android)-based projection technology, different continuing applications are displayed on an in-vehicle device in a card form, a table form, or the like, and simultaneous continuation of a plurality of continuing applications is supported. An operating system running on the terminal device may further include but is not limited to a portable terminal device that carries an iOS operating system, a Microsoft operating system, or another operating system. This is not specifically limited in this embodiment of this application.
[0046] Solutions in this application are mainly applied to a terminal device. The terminal device may be but is not limited to a mobile phone, a wearable device, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a laptop (laptop), a mobile computer, or any other terminal device or portable terminal device. As shown in
[0047] It can be learned from
[0048] The in-vehicle terminal APP 302 may include a system user interface (system user interface, systemUI) module configured to be responsible for drawing a view (view) like a program dock (dock) bar, a status bar, and a home screen launcher (launcher) that is displayed on an in-vehicle screen of the in-vehicle device, for example, drawing content other than a card in
[0049] After detecting a start broadcast sent by the in-vehicle terminal APP 302, any other APP that is except the in-vehicle terminal APP and that runs on the mobile phone sends corresponding information, and may also perform continuation by broadcasting update information corresponding to the continuing application 301. It may be understood that the start broadcast can be detected only when the continuing application 301 is started and runs. For an APP like a setting application or an application store application, because corresponding continuation does not need to be implemented for a user, even after the APP is started and runs, the start broadcast may be ignored after the broadcast is detected. In an example, APP that is of the terminal device and that is to respond and send information corresponding to the APP after the start broadcast is detected is selected in a manner of setting a whitelist or a blacklist.
[0050]
[0051] As shown in
[0052] A person skilled in the art should note that the in-vehicle device in this application is an in-vehicle device with an in-vehicle screen, and the terminal device may migrate, in a wired or wireless link manner, an image of the terminal device to the in-vehicle screen of the in-vehicle device for displaying, as shown in
[0053] In an embodiment, first, the terminal device needs to be connected to the in-vehicle device in a wired or wireless manner, as shown in
[0054] The in-vehicle terminal APP and the third-party APP/non-third-party APP perform status and data exchanges mainly by using a broadcast mechanism. The third-party APP/non-third-party APP can adapt to the broadcast mechanism provided by the in-vehicle terminal APP to continue the third-party APP/non-third-party APP from a screen of the terminal device to the in-vehicle screen of the in-vehicle terminal device, and transfer data. In an example, the first broadcast in S406 may be ACTION_CAR_STARTED, a sender of the broadcast is the in-vehicle terminal APP, a receiver may be any APP running on the terminal device, and the first broadcast is used to indicate that the terminal device is connected to the in-vehicle device. It may be understood that, when the first broadcast is sent, the in-vehicle terminal APP group-sends the broadcast, so that every running APP can receive the first broadcast, and send the second broadcast to the in-vehicle terminal APP. It may be understood that the first broadcast notifies the running third-party APP/non-third-party APP that the in-vehicle device is connected and data exchange can be started. The first broadcast does not have additional data, and may be merely broadcast as a message.
[0055] After receiving the first broadcast, the at least one third-party APP/non-third-party APP may send a second broadcast to the in-vehicle terminal APP (S407). In an example, a remote card receiver (remote card receiver) may receive the second broadcast. It may be understood that the second board received by the remote card receiver RemoteCardReceiver may be one or more, and this specifically depends on a quantity of the third-party APP/non-third-party APP that sends a second broadcast corresponding to each of the third-party APP or the non-third-party APP. The second broadcast may be ACTIONAPP_REMOTE_CARD.sub.-ADD, a sender of the broadcast is the third-party APP/non-third-party APP, and the broadcast may carry information that needs to be displayed and that is of the third-party APP/non-third-party APP. Obviously, a receiver is the in-vehicle terminal APP. After receiving the first broadcast message sent by the in-vehicle terminal APP, the third-party APP/non-third-party APP sends a broadcast including information of the third-party APP/non-third-party APP to the in-vehicle terminal APP, so that the in-vehicle terminal APP executes add remote information, for example, draws, on the to-be-displayed home screen of the in-vehicle device, information corresponding to the third-party APP/non-third-party APP. The corresponding information may be displayed in a form of a table, an icon, a card, or the like. The second broadcast includes basic information corresponding to the third-party APP/non-third-party APP, for example, a package name and an identity, and information that needs to be displayed, for example, application data. After receiving at least one second broadcast, RemoteCardReceiver notifies the in-vehicle terminal systemUI to execute add remote card (S408). It may be understood that in S408, the remote card receiver (RemoteCardReceiver) forwards information of the second broadcast to the in-vehicle terminal systemUI.
[0056] In an example, the in-vehicle terminal APP may further send a third broadcast to the third-party APP/non-third-party APP by using the broadcast sender BroadcastSender (S409). The third broadcast may be ACTION_APP_REMOTE_CARDADDED, a sender of the broadcast is the in-vehicle terminal APP, and the broadcast may indicate that information corresponding to the third-party APP/non-third-party APP is added to the to-be-displayed interface. One receiver of the third broadcast is one third-party APP/non-third-party APP, and the third broadcast is not group-sent like the first broadcast. It may be understood that, for different third-party APPs/non-third-party APPs, the in-vehicle terminal APP sends different third broadcasts to corresponding third-party APPs/non-third-party APPs by adding, to the third broadcast, information used to indicate a specific APP. The third broadcast sent by the in-vehicle terminal APP may be used as a response message to indicate that the information corresponding to the third-party APP or the non-third-party APP is successfully added to the to-be-displayed home screen of the in-vehicle terminal APP. It may be understood that the third broadcast is used by the in-vehicle terminal APP to feed back an information addition success message to a corresponding third-party APP/non-third-party APP. If a card form is used for displaying on the in-vehicle terminal APP, the third broadcast further includes a card identity corresponding to a card, and is used to distinguish between different cards when there are a plurality of cards. For example, after both a navigation application and a music playing application receive a group-sent first broadcast, the navigation application and the music playing application each send their own second broadcast to the in-vehicle terminal APP. After adding, on the to-be-displayed interface of the in-vehicle screen based on the second broadcast of the navigation application, a card corresponding to the navigation application, the in-vehicle terminal APP sends a third broadcast to the navigation application to notify the navigation application that the card is successfully added. After adding, on the to-be-displayed interface of the in-vehicle screen based on the second broadcast of the music playing application, a card corresponding to the navigation application, the terminal in-vehicle APP sends a third broadcast to the music playing application to notify the music playing application that the card is successfully added.
[0057] In an example, by using a first broadcast, a second broadcast, and a third broadcast between the in-vehicle terminal APP and the third-party APP or the non-third-party APP, a process in which the in-vehicle terminal APP loads information corresponding to the third-party APP or the non-third-party APP on a to-be-displayed home screen after a terminal device is connected to an in-vehicle device is implemented. The to-be-displayed home screen is used to be displayed on the in-vehicle screen of the in-vehicle device.
[0058] In some examples, the third-party APP or the non-third-party APP is added only when the terminal device begins to be connected to the in-vehicle device, that is, the first broadcast is sent only when the terminal device is just connected to the in-vehicle device. Therefore, the card is added only by using a second broadcast sent by a third-party APP or a non-third-party APP that has received the first broadcast. For example, if the terminal device is a mobile phone, and before the mobile phone is connected to the in-vehicle device, five applications such as applications A, B, C, D, and E simultaneously run on the mobile phone, after the mobile phone is connected to the in-vehicle device, information, such as a table, an icon, or a card, separately corresponding to the applications A, B, C, D, and E is also generated. However, if a new application like an application F is started in the mobile phone after the connection, information corresponding to the application F is no longer generated. In some other examples, if a user returns to a home screen from an application by performing a specific operation on the in-vehicle screen of the in-vehicle device, the in-vehicle terminal APP may repeat the foregoing step of sending the first broadcast, and re-receive a new second broadcast, to redraw a to-be-displayed home screen, which ensures update of an application type or an application quantity on the to-be-displayed home screen. For example, an APP is displayed on the in-vehicle screen. After a user taps a return button, an image displayed on the in-vehicle screen changes from the APP to the home screen. In this case, the first broadcast to the third broadcast may be repeated to redraw a to-be-displayed home screen, to ensure that when the APP is used, if a user newly starts an application F on the terminal device, information corresponding to the application F may be displayed on the to-be-displayed home screen. For example, a new application F is added to the table, or a new icon F is added, or a card of the newly added application F is added.
[0059] In an embodiment, the second broadcast carries information corresponding to the third-party APP/non-third-party APP. In an example, the information may be text information, icon information, or card information. Card information is used as an example. An information format of the card information may be shown in Table 1.
TABLE-US-00001 Key (key) Type Description cardID IntExtra Unique card identity packageName StringExtra Third-party APP package name, used to generate a card title cardType IntExtra Card type priority IntExtra Sequencing priority remote Views ParcelableExtra Card content
[0060] Android provides an intent (intent) mechanism to assist interaction and communication between applications, and the card information format shown in Table 1 provides relatively specific broadcast intent content.
[0061] The broadcast format may include: a card identity (cardidentity, cardID), where a data type of the card identity is an integer IntExtra, and the card identity is used to indicate a unique identity of the card; a package name (package name), where the package name indicates a package name of the third-party APP/non-third-party APP, a data type of the package name is a string StringExtra, and the package name may be used to generate a title of the card, for example, music, a call, a map, or another name; a card type (card type), where a data type of the card type is an integer IntExtra, and the card type is used to indicate a type of an application corresponding to the card, for example, a notification, a button, or an application refreshed in real time; a priority (priority), where a data type of the priority is an integer IntExtra, and the priority is used to indicate a display priority of the card on the in-vehicle screen of the in-vehicle device, for example, a card with a high priority is preferentially displayed; and a remote view (remot view), where a data type of the remote view is a complex data type ParcelableExtra, and the remote view is used to indicate all content that needs to be displayed by the card, for example, music data, video data, call data, and map data, such as content of an audio player interface, content of a video player interface, content of a call interface, and content of a navigation interface. In an example, in the foregoing card types, the notification may indicate that an application corresponding to the card may be an application of a schedule information type; the button may indicate that an application corresponding to the card may be a voice call application, a music application, or a video application; and the application refreshed in real time may indicate that an application corresponding to the card may be an application like a map navigation application or a star watching application. It may be understood that at least card content and the card identity are included, and the card identity may be replaced by the package name.
[0062] It may be understood that when the information corresponding to the third-party APP/non-third-party APP displayed on the in-vehicle device is text information or icon information, no card ID or card type is required. Icon information may include any related information that may be required, such as an icon ID and an icon type.
[0063] The following returns to
[0064] In an example, for the fourth broadcast sent during update, if a card form is used for displaying, a card format used to update card intent content is the same as the card format shown in Table 1. For ease of description, details are not described herein again.
[0065] In an example, for adding and updating a card, the third-party APP or the non-third-party APP in this application sends information such as a pending intent (pending intent) and a card view to the in-vehicle terminal APP by using RemoteView, so that the in-vehicle terminal APP draws corresponding information on a launcher, and then performs display on the in-vehicle screen.
[0066] RemoteView is a native Android mechanism. In this application, RemoteView is used to encapsulate a current APP status, and refresh an APP status by using a broadcast mechanism. For example, music that is being played, navigation that is being performed, and information of an ongoing call. A user can conveniently browse information of each application by using a card list displayed on the in-vehicle screen. For example,
[0067] PendingIntent is also a native Android mechanism. In this application, PendingIntent is mainly used to store information of the third-party APP or the non-third-party APP, and complete corresponding application continuation. In a current Android framework, when an application process is displayed on an in-vehicle screen, a process of a third-partyAPP or a non-third-party APP on a terminal device needs to be killed, and PendingIntent is used as a carrier of application status information for continuation when the process of the third-party APP or the non-third-party APP is started by using an in-vehicle terminal APP. That is, the in-vehicle terminal APP starts the third-party APP or the non-third-party APP whose process is killed and loads information of PendingIntent to the third-party APP or the non-third-party APP. For example, the third-party APP or the non-third-party APP is a navigation application, the information of PendingIntent is information like a start point, an end point, a current location, and a direction of the navigation application. When the navigation application is restarted, the information of PendingIntent is loaded, so that content of the navigation application can be displayed on the in-vehicle screen without interruption. If the Android framework is not used, a process may not need to be killed, and corresponding information of a third-party APP or a non-third-party APP loaded on the in-vehicle screen may be controlled according to a corresponding specification of a used system.
[0068] In an example, after the in-vehicle terminal APP finishes drawing the to-be-displayed home screen, the drawn information is transferred to the in-vehicle device in a wired or wireless manner. In this way, the in-vehicle device receives the information transferred by the terminal device, and renders the received information, so that the information is displayed on the in-vehicle screen of the in-vehicle device.
[0069] In this application, in the foregoing manner, different applications may be continued from a terminal device to an in-vehicle screen of an in-vehicle device for displaying. For example,
[0070] Similarly,
[0071] It may be understood that, for the effects shown in
[0072] In some examples, for the to-be-displayed interface drawn by the terminal device, if a third-party APP or a non-third-party APP has display resources of a different specification, a terminal device may draw, with reference to a display resource of a corresponding APP, a card corresponding to the application. For example, if a third-party APP or a non-third-party APP carries landscape display resources, after a terminal device is connected to an in-vehicle device, a card corresponding to the application may be drawn on a to-be-displayed interface in a landscape manner based on the landscape display resources carried by the third-party APP or the non-third-party APP. If a third-party APP or a non-third-party APP carries customized display resources for an in-vehicle screen, a card may be drawn by using display resources of an in-vehicle screen based on the customized display resources carried by the third-party APP or the non-third-party APP. The display resources include one or more display elements such as an interface background, an icon, space, and an interface layout.
[0073] In this application, application continuation is performed in a card display manner, which helps a user operates more intuitively and efficiently.
[0074] Return to
[0075] It may be understood that, if a user deletes, on the in-vehicle screen, information corresponding to an APP, information of the APP may also be removed. In this case, the in-vehicle device may directly delete the card. Alternatively, the in-vehicle device sends the operation performed by the user on the in-vehicle screen to the corresponding APP on the terminal device. As described in the foregoing solution, the APP sends a fifth broadcast to the in-vehicle terminal APP, to remove the corresponding card. In another example, if the wired or wireless link between the terminal device and the in-vehicle device is interrupted, the in-vehicle terminal APP may remove all cards. In an example, as shown in
[0076] In an example, the sixth broadcast may be ACTION_APP_REMOTE_CARD_REMOVED, a sender of the broadcast is the in-vehicle terminal APP, the broadcast may carry indication information used to indicate the third-party APP or the non-third-party APP, and a receiver may be the third-party APP or the non-third-party APP. It should be noted that, in this case, the receiver of the sixth broadcast is a third-party APP or a non-third-party APP corresponding to a single application. As is similar to the third broadcast, the sixth broadcast is not group-sent like the first broadcast. The sixth broadcast is used to notify the third-party APP or the non-third-party APP that the corresponding information that is displayed on the in-vehicle screen and that is of the third-party APP or the non-third-party APP is removed. If a card form is used for displaying, the sixth broadcast may include a card ID corresponding to a removed card. If another form like a table or an icon is used for displaying, no card ID is required. For example, when an icon form is used, any other information that may be required, such as an icon ID, may be further included.
[0077] In another example, the seventh broadcast may be ACTION_CAR_END, and a sender of the broadcast is the in-vehicle terminal APP. It should be noted that the seventh broadcast is similar to the first broadcast as a group-sent broadcast. The seventh broadcast is used by the in-vehicle terminal APP to notify every third-party APP or non-third-party APP that the in-vehicle device is disconnected from the terminal device. It should be noted that the seventh broadcast does not have additional data, and may be merely broadcast as a message.
[0078] In still another example, if a display form is a card form, the fifth broadcast or the sixth broadcast may carry information of a removed card. An information format of the card information may be shown in Table 2.
TABLE-US-00002 Key (key) Type Description cardID IntExtra Unique card identity packageName StringExtra Third-party APP package name
[0079] The card information format shown in Table 2 provides relatively specific broadcast intent content of the removed card. The broadcast format may include: cardID, where a data type of cardID is an integer IntExtra, and cardID is used to indicate a unique identity of the card; packageName, where packageName indicates a package name of a third-party APP/non-third-party APP, a data type of packageName is a string StringExtra, and packageName may indicate a specific third-party APP/non-third-party APP to be removed, for example, a name like music, a call, or a map. It may be understood that if a display form is a text form, an icon form, or another form, no card ID is required. Icon information may include any related information that may be required, such as an icon ID.
[0080] This application provides an application display continuing method, and any third-party APP or non-third-party APP that has a requirement can be continued by using the method. If an original interface display resource is used, after being started on an in-vehicle screen, a continued application still conforms to a landscape layout or a PAD layout on a terminal device, so that an original form of an original interface of the terminal device is inherited, a use habit of a user does not need to be changed, and use continuity of the user is kept. An interface display resource that adapts to an in-vehicle screen may alternatively be used, to better adapt to display on the in-vehicle screen. In addition, any type and any quantity of applications can be simultaneously continued, thereby ensuring continuity of a plurality of services when a user uses an in-vehicle device, and greatly improving convenience of operating different applications on the in-vehicle device.
[0081] A person skilled in the art should note that this application can support continuation of any third-party application that can implement an interface. This application is also applicable to another form of a multi-screen framework. For example, a terminal device continues a screen to a television, a projector, a PAD, to implement cross-screen continuation of a plurality of applications.
[0082]
[0083] As shown in
[0084] S901. A first application sends a first broadcast to at least one second application.
[0085] After the first application sends the first broadcast to the at least one second application, the second application sends a second broadcast to the first application based on the first broadcast. The at least one second application may include two applications, for example, a navigation application and a music playing application.
[0086] S902. The first application receives a second broadcast sent by the at least one second application, and the second broadcast includes first data information of the second application.
[0087] In a possible implementation, the first data information may include one or more of a card identity of a card corresponding to the second application, a package name of the second application, a card type of the card corresponding to the second application, a priority of the card corresponding to the second application, or content of the second application. A person skilled in the art should note that any information may be added based on an actual requirement. For example, the navigation application and the music playing application separately send a second broadcast.
[0088] S903. The first application generates, based on the first data information, the card corresponding to the second application, and draws an interface to be displayed on the in-vehicle device. The terminal device sends the to-be-displayed interface to the in-vehicle device for displaying.
[0089] S904. When a user taps the card corresponding to the second application on an in-vehicle screen of the in-vehicle device, the in-vehicle device notifies the first application, so that the first application displays content of the second application in detail on the in-vehicle device based on the first data information of the second application.
[0090] S905. The first application sends at least one third broadcast to the at least one second application, to notify the at least one second application that the card is successfully added. The second application receives the third broadcast sent by the first application.
[0091]
[0092] As shown in
[0093] S1001. A first application receives at least one fourth broadcast sent by at least one second application, and the fourth broadcast includes second data information of the second application.
[0094] In a possible implementation, the second data information may include one or more of a card identity of a card corresponding to the second application, a package name of the second application, a card type of the card corresponding to the second application, a priority of the card corresponding to the second application, or content of the second application. A person skilled in the art should note that any information may be added based on an actual requirement. The second data information is similar to the first data information.
[0095] S1002. The first application updates, based on the second data information of the second application, content that is of the second application and that is displayed on the in-vehicle device.
[0096] It may be understood that the update process shown in
[0097]
[0098] As shown in
[0099] S1101. A first application receives at least one fifth broadcast sent by at least one second application, and the fifth broadcast includes third data information of the second application.
[0100] In a possible implementation, the third data information may include one or more of a card identity of a card corresponding to the second application and a package name of the second application. A person skilled in the art should note that any information may be added based on an actual requirement.
[0101] S1102. Remove, based on the fifth broadcast, the card that corresponds to the second application and that is displayed on an in-vehicle device.
[0102] In a possible implementation, the first application removes, based on the fifth broadcast and the third data information that is of the second application and that is included in the fifth broadcast, the card that corresponds to the second application and that is displayed on the in-vehicle device.
[0103]
[0104] As shown in
[0105] S1201. When a terminal device is disconnected from an in-vehicle device, a first application sends at least one sixth broadcast to at least one second application, to notify that a card corresponding to the at least one second application is removed. It may be understood that the sixth broadcast carries an ID of the card.
[0106] S1202. Send a seventh broadcast to the at least one second application, to notify the at least one second application that a wired connection or wireless connection between the terminal device and the in-vehicle device is already disconnected. The seventh broadcast may be a group-sent broadcast, as is similar to the first broadcast.
[0107] It may be understood that there is no necessary sequence between S1201 and S1202. Alternatively, S1202 may be performed before S1201. Alternatively, only S1201 or S1202 is performed.
[0108]
[0109] As shown in
[0110] It may be understood that the structure shown in this embodiment of the present invention does not constitute a specific limitation on the electronic device 1300. In some other embodiments of this application, the electronic device 1300 may include more or fewer components than those shown in the figure, or some components may be combined, or some components may be split, or there may be a different component layout. The components shown in the figure may be implemented by hardware, software, or a combination of software and hardware.
[0111] The processor 1310 may include one or more processing units. For example, the processor 1310 may include an application processor (application processor, AP), a central processing unit (central processing unit, CPU), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video coder/decoder, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural-network processing unit (neural-network processing unit, NPU). Different processing units may be independent components, or may be integrated into one or more processors.
[0112] The processor 1310 may generate an operation control signal based on an instruction operation code and a time sequence signal to control instruction fetching and instruction executing.
[0113] A memory may be further disposed in the processor 1310, and is configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache. The memory may store instructions or data just used or cyclically used by the processor 1310. If the processor 1310 needs to use the instructions or the data again, the processor 1310 may directly invoke the instructions or the data from the memory. This avoids repeated access and reduces waiting time of the processor 1310, thereby improving system efficiency.
[0114] In some embodiments, the processor 1310 may include one or more interfaces. The interface may include an inter-integrated circuit (inter-integrated circuit, I2C) interface, an inter-integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (general-purpose input/output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, a universal serial bus (universal serial bus, USB) interface, and/or the like.
[0115] It may be understood that an interface connection relationship between the modules that is shown in this embodiment of the present invention is only an example for description, and does not constitute a limitation on the structure of the electronic device 1300. In some other embodiments of this application, the electronic device 1300 may alternatively use an interface connection manner different from that in the foregoing embodiment, or a combination of a plurality of interface connection manners.
[0116] The charging management module 1340 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 1340 may receive charging input from a wired charger via a USB interface 1330. In some embodiments of wireless charging, the charging management module 1340 may receive wireless charging input via a wireless charging coil of the electronic device 1300. When charging the battery 1342, the charging management module 1340 may further supply power to the electronic device by using the power supply management module 1341.
[0117] The power supply management module 1341 is configured to connect the battery 1342, the charging management module 1340, and the processor 1310. The power supply management module 1341 receives input of the battery 1342 and/or the charging management module 1340, and supplies power to the processor 1310, the internal memory 1321, the display 1394, the camera 1393, the wireless communications module 1360. The power supply management module 1341 may be further configured to monitor parameters such as a battery capacity, a battery cycle count, and a battery health status (electric leakage or impedance). In some other embodiments, the power supply management module 1341 may alternatively be disposed in the processor 1310. In some other embodiments, the power supply management module 1341 and the charging management module 1340 may alternatively be disposed in a same component.
[0118] A wireless communication function of the electronic device 1300 may be implemented by using the antenna 1, the antenna 2, the mobile communications module 1350, the wireless communications module 1360, the modem processor, and the baseband processor.
[0119] The antenna 1 and the antenna 2 are configured to transmit and receive an electromagnetic wave signal. Each antenna in the electronic device 1300 may be configured to cover one or more communications frequency bands. Different antennas may be multiplexed to improve utilization of the antennas. For example, the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antenna may be used in combination with a tuning switch.
[0120] The mobile communications module 1350 may provide a wireless communications solution applied to the electronic device 1300 including 2G/3G/4G/5G. The mobile communications module 1350 may include at least one filter, a switch, a power amplifier, a lownoise amplifier (low noise amplifier, LNA), and the like. The mobile communications module 1350 may receive an electromagnetic wave by using the antenna 1, perform processing such as filtering and amplifying on the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communications module 1350 may further amplify a signal modulated by the modem processor, and convert, by using the antenna 1, the signal into an electromagnetic wave for radiation. In some embodiments, at least some functional modules in the mobile communications module 1350 may be disposed in the processor 1310. In some embodiments, at least some function modules of the mobile communications module 1350 may be disposed in a same device with at least some modules of the processor 1310.
[0121] The wireless communications module 1360 may provide a solution that is applied to the electronic device 1300 and that is to wireless communications including wireless local area networks (wireless local area networks, WLAN) (for example, a wireless fidelity (wireless fidelity, Wi-Fi) network), Bluetooth (bluetooth, BT), a global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), a near field communication (near field communication, NFC) technology, an infrared (infrared, IR) technology, and the like. The wireless communications module 1360 may be one or more components that integrate at least one communications processor module. The wireless communications module 1360 receives an electromagnetic wave by using the antenna 2, performs frequency modulation and filtering on the electromagnetic wave signal, and sends the processed signal to the processor 1310. The wireless communications module 1360 may further receive a to-be-sent signal from the processor 1310, perform frequency modulation and amplification on the to-be-sent signal, and convert, by using the antenna 2, the signal into an electromagnetic wave for radiation.
[0122] In some embodiments, the antenna 1 of the electronic device 1300 is coupled to the mobile communications module 1350, and the antenna 2 is coupled to the wireless communications module 1360, so that the electronic device 1300 may communicate with a network and another device by using a wireless communications technology. The wireless communication technology may include a global system for mobile communications (global system for mobile communications, GSM), a general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, a GNSS, a WLAN, NFC, FM, and/or an IR technology. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi-zenith satellite system, QZSS), and/or satellite based augmentation systems (satellite based augmentation system, SBAS).
[0123] The display 1394 is configured to display an image, a video, and the like. The display 1394 includes a display panel. The display panel may use a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (organic light-emitting diode, OLED), an active-matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), a flex light-emitting diode (flex light-emitting diode, FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), and the like. In some embodiments, the electronic device 1300 may include one or N displays 1394, where N is a positive integer greater than 1.
[0124] The electronic device 1300 may implement a photographing function by using an ISP, the camera 1393, the video coder/decoder, a GPU, the display 1394, an application processor, and the like.
[0125] The camera 1393 is configured to capture a static image or a video.
[0126] The external memory interface 1320 may be used to connect an external memory card, for example, a Micro SD card, to extend a storage capability of the electronic device 1300. The external memory card communicates with the processor 1310 via the external memory interface 1320, to implement a data storage function. For example, a music file or a video file is stored in the external storage card.
[0127] The internal memory 1321 may be configured to store computer-executable program code, and the executable program code includes instructions. The internal memory 1321 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (for example, a sound playing function or an image playing function), and the like. The data storage area may store data (such as audio data and a phone book) created during use of the electronic device 1300. In addition, the internal memory 1321 may include a volatile memory (volatile memory), for example, a random-access memory (random-access memory, RAM), and may further include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk storage component, a universal flash storage (universal flash storage, UFS), a read-only memory (read-only memory, ROM), a flash memory, a hard disk drive (hard disk drive, HDD), or a solid state drive (solid state drive, SSD). A memory 1602 may further include a combination of the foregoing types of memories. The processor 1310 runs instructions stored in the internal memory 1321 and/or instructions stored in a memory disposed in the processor, to perform various function applications of the electronic device and data processing that are of the electronic device 1300.
[0128] The electronic device 1300 may implement an audio function by using the audio module 1370, the loudspeaker 1370A, the receiver 1370B, the microphone 1370C, the headset port 1370D, and an application processor. For example, music play and recording.
[0129] The audio module 1370 is configured to convert digital audio information into an analog audio signal for output, and is also configured to convert analog audio input into a digital audio signal. The audio module 1370 may further be configured to code and decode an audio signal. In some embodiments, the audio module 1370 may be disposed in the processor 1310, or some function modules in the audio module 1370 are disposed in the processor 1310.
[0130] A software system of the electronic device 100 may use a hierarchical architecture, an event-driven architecture, a microkernel architecture, a micro service architecture, or a cloud architecture. In this embodiment of the present invention, a software structure of the electronic device 1300 is described by using an Android system with a hierarchical architecture as an example.
[0131] When the processor 1310 is coupled to the internal memory 1321, the processor 1310 reads and executes instructions in the internal memory 1321. When the processor 1310 runs, the instructions are executed, so that the processor 1310 is further configured to perform the methods shown in
[0132] A person of ordinary skill in the art may be aware that, in combination with the examples described in embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware, computer software, or a combination thereof. To clearly describe the interchangeability between the hardware and the software, the foregoing has generally described compositions and steps of each example according to functions. Whether the functions are performed by hardware or software depends on particular applications and design constraints of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
[0133] A person of ordinary skill in the art may understand that all or some of the steps in each of the foregoing method of the embodiments may be implemented by a program instructing a processor. The foregoing program may be stored in a computer-readable storage medium. The storage medium may be a non-transitory (English: non-transitory) medium, like a random-access memory, read-only memory, a flash memory, a hard disk, a solid state drive, a magnetic tape (English: magnetic tape), a floppy disk (English: floppy disk), an optical disc (English: optical disc), or any combination thereof.
[0134] The foregoing descriptions are merely exemplary specific embodiments of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.