WO2022052928A1 - 一种应用接入方法及相关装置 - Google Patents

一种应用接入方法及相关装置 Download PDF

Info

Publication number
WO2022052928A1
WO2022052928A1 PCT/CN2021/117075 CN2021117075W WO2022052928A1 WO 2022052928 A1 WO2022052928 A1 WO 2022052928A1 CN 2021117075 W CN2021117075 W CN 2021117075W WO 2022052928 A1 WO2022052928 A1 WO 2022052928A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
display
interface
screen
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/117075
Other languages
English (en)
French (fr)
Inventor
郭坤
魏征
张仕钊
王丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP21865982.9A priority Critical patent/EP4202666A4/en
Priority to US18/044,616 priority patent/US20230333801A1/en
Publication of WO2022052928A1 publication Critical patent/WO2022052928A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04886Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/20Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor
    • B60K35/21Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor using visual output, e.g. blinking lights or matrix displays
    • B60K35/22Display screens
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/20Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor
    • B60K35/26Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor using acoustic output
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/20Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor
    • B60K35/28Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor characterised by the type of the output information, e.g. video entertainment or vehicle dynamics information; characterised by the purpose of the output information, e.g. for attracting the attention of the driver
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/20Output arrangements, i.e. from vehicle to user, associated with vehicle functions or specially adapted therefor
    • B60K35/29Instruments characterised by the way in which information is handled, e.g. showing information on plural displays or prioritising information according to driving conditions
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/80Arrangements for controlling instruments
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/80Arrangements for controlling instruments
    • B60K35/81Arrangements for controlling instruments for controlling displays
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K35/00Instruments specially adapted for vehicles; Arrangement of instruments in or on vehicles
    • B60K35/85Arrangements for transferring vehicle- or driver-related data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/147Digital output to display device ; Cooperation and interconnection of the display device with other functional units using display panels
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/452Remote windowing, e.g. X-Window System, desktop virtualisation
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K2360/00Indexing scheme associated with groups B60K35/00 or B60K37/00 relating to details of instruments or dashboards
    • B60K2360/55Remote control arrangements
    • B60K2360/56Remote control arrangements using mobile devices
    • B60K2360/563Vehicle displaying mobile device information
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60KARRANGEMENT OR MOUNTING OF PROPULSION UNITS OR OF TRANSMISSIONS IN VEHICLES; ARRANGEMENT OR MOUNTING OF PLURAL DIVERSE PRIME-MOVERS IN VEHICLES; AUXILIARY DRIVES FOR VEHICLES; INSTRUMENTATION OR DASHBOARDS FOR VEHICLES; ARRANGEMENTS IN CONNECTION WITH COOLING, AIR INTAKE, GAS EXHAUST OR FUEL SUPPLY OF PROPULSION UNITS IN VEHICLES
    • B60K2360/00Indexing scheme associated with groups B60K35/00 or B60K37/00 relating to details of instruments or dashboards
    • B60K2360/583Data transfer between instruments
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2354/00Aspects of interface with display user
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2370/00Aspects of data communication
    • G09G2370/04Exchange of auxiliary data, i.e. other than image data, between monitor and graphics controller

Definitions

  • the present application relates to the field of electronic technologies, and in particular, to an application access method and related devices.
  • the present application provides an application access method and related apparatus, which realize the adaptation and access of target application software on display screens of different sizes. In this way, application manufacturers can develop application software suitable for display screens of different sizes without paying attention to the UI, thereby improving development efficiency.
  • the present application provides an application access method, which is applied to a first electronic device and a second electronic device.
  • the first electronic device and the second electronic device establish a communication connection, and the method includes: the first electronic device runs a target application, obtains the first display content of the target application; the first electronic device obtains the screen display parameters of the first electronic device; the first electronic device obtains the screen display parameters of the second electronic device; the first electronic device obtains the screen display parameters of the second electronic device based on the first display content and the A screen display parameter of an electronic device determines the first display data; the first electronic device determines the second display data based on the first display content and the screen display parameters of the second electronic device; the first electronic device determines the second display data based on the first display data , display the first interface; the first electronic device sends the second display data to the second electronic device; the second electronic device displays the second interface on the display screen of the second electronic device based on the second display data, and the controls in the first interface
  • the layout is different from the layout of the controls in the
  • Screen display parameters include screen size (length, width), resolution and other parameters.
  • the embodiment of the present application provides an application template CarKit.aar for application manufacturers. Based on this application template, application manufacturers do not need to pay attention to the UI, but only need to implement the interface declared in CarKit.aar, and then they can develop an application template suitable for the second electronic device. Application software, the development efficiency is greatly improved.
  • the application manufacturer completes the adaptation development of the target application software according to CarKit.aar, and installs and runs it in the first electronic device. When the first electronic device and the second electronic device are successfully connected, the first electronic device obtains the information of the second electronic device.
  • the screen size of the display screen based on the screen size of the display screen of the second electronic device and the display content of the target application, CarKit completes the layout of the display content, and the first electronic device draws a display adapted to the screen size of the second electronic device
  • the interface displays the display content of the target application on the display screen of the second electronic device, and the user can operate the target application software on the second electronic device to complete the access of the target application software on the second electronic device.
  • the first electronic device Based on the screen size of the display screen of the first electronic device and the display content of the target application, the first electronic device draws a display interface adapted to the screen size of the first electronic device, and displays the display content of the target application on the first electronic device. on the display. That is to say, the target application displays a set of user interfaces on the display screen of the first electronic device and the display screen of the second electronic device respectively, and the user interface displayed on the first electronic device is laid out by the map application, and the display The user interface on the second electronic device is laid out by CarKit.
  • the method further includes: the second electronic device receives the first touch operation acting on the second interface; the second electronic device sends the first touch operation to the first electronic device
  • the first electronic device determines the function triggered by the first touch operation based on the touch parameters of the first touch operation and the second display data; the first electronic device obtains the function triggered by the first touch operation based on the first electronic device the second display content of the target application; the first electronic device determines the third display data based on the second display content and the screen display parameters of the second electronic device; the first electronic device sends the third display data to the second electronic device;
  • the second electronic device displays a third interface on the display screen of the second electronic device based on the third display data.
  • the second electronic device provides touch parameters of the operation to the first electronic device.
  • the touch parameters may indicate touch coordinates, touch methods (click, slide) or Controls acted by touch operations, events triggered by touch operations (text input on a control), etc.
  • the Carkit in the first electronic device invokes the corresponding method and interface based on the touch parameters, obtains the display content from the map application, and then the CarKit makes a layout and displays it on the display screen of the second electronic device. Wherein, operating the target application on the second electronic device does not affect the display interface of the first electronic device.
  • the method further includes: the first electronic device receives a second touch operation acting on the first interface; the first electronic device, based on the touch parameters of the second touch operation, and the first display data to determine the function triggered by the second touch operation; the first electronic device obtains the third display content of the target application based on the function triggered by the second touch operation; the first electronic device obtains the third display content of the target application based on the third display content and the first The screen display parameters of the electronic device determine fourth display data; the first electronic device displays a fourth interface based on the fourth display data.
  • the first electronic device provides the target application with touch parameters (touch coordinates, input text, etc.) on the display of an electronic device. Wherein, operating the target application on the first electronic device does not affect the display interface of the second electronic device.
  • the screen display parameters include screen length and screen width
  • the method further includes: the first electronic device obtains screen display parameters of a third electronic device, and the screen length of the third electronic device is greater than The screen length of the second electronic device; the first electronic device determines the fifth display data based on the first display content and the screen display parameters of the third electronic device; the first electronic device sends the fifth display data to the third electronic device; The third electronic device displays a fifth interface on the display screen of the third electronic device based on the fifth display data, and the display length of the first function control in the fifth interface is greater than the display length of the first function control in the second interface.
  • a layout rule is exemplarily described here.
  • the display length of a control displayed on the third electronic device may be greater than the display length of the control displayed on the second electronic device.
  • Display length on That is, the display length of the control is positively related to the length of the display screen.
  • the embodiments of the present application also provide some layout rules, such as stretching, zooming, hiding, dividing, proportioning, wrapping, extending, and the like.
  • the first display content includes a map basemap and one or more function controls; the one or more function controls include a search box control; the second The display content includes historical search records; the first electronic device determines the function triggered by the first touch operation based on the touch parameters of the first touch operation and the second display data, which specifically includes: the first electronic device is based on the first touch operation.
  • the touch parameters of the operation and the second display data determine that the first touch operation is a user operation for the search box control.
  • Carkit in the first electronic device determines that the first touch operation is a user operation for the search box control
  • Carkit invokes corresponding methods and interfaces (such as the searchaddress method and the onsearchaddress interface) based on the touch parameters, and obtains the information from the map application.
  • the map application obtains the corresponding data based on the searchaddress method, and provides the data to CarKit through the onsearchaddress interface, and then CarKit makes a layout and displays it on the display screen of the second electronic device.
  • the method further includes: the second electronic device receives a third touch operation acting on the third interface; the second electronic device sends touch parameters of the third touch operation to the first electronic device; The first electronic device determines, based on the touch parameters of the third touch operation and the third display data, that the second touch operation is a user operation for inputting the first text for the search box control; the first electronic device obtains the first text as the user's operation. the first address information of the target location; the first electronic device determines the sixth display data based on the first address information and the screen display parameters of the second electronic device; the first electronic device sends the sixth display data to the second electronic device; The second electronic device displays a sixth interface on the display screen of the second electronic device based on the sixth display data.
  • the sixth display data includes the first address information and the start navigation control; the method further includes: the second electronic device receives a fourth touch operation acting on the sixth interface; An electronic device sends touch parameters of the fourth touch operation; based on the touch parameters of the fourth touch operation and the sixth display data, the first electronic device determines that the fourth touch operation is a user operation for starting the navigation control
  • the first electronic device obtains the navigation information with the current position of the second electronic device as the starting point and the first address information as the destination; the first electronic device determines the first electronic device based on the navigation information and the screen display parameters of the second electronic device Seven display data; the first electronic device sends the seventh display data to the second electronic device; the second electronic device displays the seventh interface on the display screen of the second electronic device based on the seventh display data.
  • the navigation information includes at least one of the following: the distance to the next intersection, the driving direction of the next intersection, the road name of the next intersection, the remaining distance to the destination, the driving speed, and the destination the time required to reach the destination, the remaining time to reach the destination, the real picture, the road condition, or the driving route information.
  • the above embodiment specifically describes the operation flow from the home page interface to the address search page interface to the navigation interface under the map application.
  • the first display content includes one or more pictures and one or more function controls; the one or more function controls include a start playing control;
  • the second display content includes playback progress indication information;
  • the first electronic device determines the function triggered by the first touch operation based on the touch parameters of the first touch operation and the second display data, which specifically includes: the first electronic device determines the function triggered by the first touch operation based on the first touch operation.
  • a touch parameter of a touch operation and the second display data determine that the first touch operation is an operation for starting the playback control.
  • the method further includes: the first electronic device sends audio data corresponding to the second display content to the second electronic device; the second electronic device plays the audio data through a speaker of the second electronic device.
  • the above embodiment specifically describes the operation flow from the home page interface to the music playing page interface under the music application.
  • the second electronic device is a vehicle-mounted terminal.
  • the first electronic device may be a mobile phone.
  • the present application provides an application access system, including a first electronic device and a second electronic device, wherein the first electronic device is used to run a target application and obtain first display content of the target application; the first The electronic device is also used to obtain screen display parameters of the first electronic device; the first electronic device is also used to obtain screen display parameters of the second electronic device; the first electronic device is also used to obtain screen display parameters based on the first display content and the first electronic device.
  • the screen display parameters of the electronic device are used to determine the first display data; the first electronic device is also used to determine the second display data based on the first display content and the screen display parameters of the second electronic device; the first electronic device is also used to determine the second display data; is used to display the first interface based on the first display data; the first electronic device is also used to send the second display data to the second electronic device; the second electronic device is used to display the second electronic device based on the second display data
  • a second interface is displayed on the display screen of the device, and the layout of the controls in the first interface is different from the layout of the controls in the second interface.
  • Screen display parameters include screen size (length, width), resolution and other parameters.
  • the embodiment of the present application provides an application template CarKit.aar for application manufacturers. Based on this application template, application manufacturers do not need to pay attention to the UI, but only need to implement the interface declared in CarKit.aar to develop a template suitable for the second electronic device. Application software, the development efficiency is greatly improved. The application manufacturer completes the adaptation development of the target application software according to CarKit.aar, and installs and runs it in the first electronic device. When the first electronic device and the second electronic device are successfully connected, the first electronic device obtains the information of the second electronic device.
  • the screen size of the display screen based on the screen size of the display screen of the second electronic device and the display content of the target application, CarKit completes the layout of the display content, and the first electronic device draws a display adapted to the screen size of the second electronic device
  • the interface displays the display content of the target application on the display screen of the second electronic device, and the user can operate the target application software on the second electronic device to complete the access of the target application software on the second electronic device.
  • the first electronic device Based on the screen size of the display screen of the first electronic device and the display content of the target application, the first electronic device draws a display interface adapted to the screen size of the first electronic device, and displays the display content of the target application on the first electronic device. on the display. That is to say, the target application displays a set of user interfaces on the display screen of the first electronic device and the display screen of the second electronic device respectively, and the user interface displayed on the first electronic device is laid out by the map application, and the display The user interface on the second electronic device is laid out by CarKit.
  • the second device is further configured to: receive the first touch operation acting on the second interface; the second electronic device is further configured to send the first touch operation to the first electronic device touch parameters of the touch operation; the first electronic device is further configured to determine the function triggered by the first touch operation based on the touch parameters of the first touch operation and the second display data; the first electronic device is further used for acquiring the second display content of the target application based on the function triggered by the first touch operation; the first electronic device is further configured to determine third display data based on the second display content and the screen display parameters of the second electronic device; The electronic device is further configured to send third display data to the second electronic device; the second electronic device is further configured to display a third interface on the display screen of the second electronic device based on the third display data.
  • the second electronic device provides touch parameters of the operation to the first electronic device.
  • the touch parameters may indicate touch coordinates, touch methods (click, slide) or Controls acted by touch operations, events triggered by touch operations (text input on a control), etc.
  • the Carkit in the first electronic device invokes the corresponding method and interface based on the touch parameters, obtains the display content from the map application, and then the CarKit makes a layout and displays it on the display screen of the second electronic device. Wherein, operating the target application on the second electronic device does not affect the display interface of the first electronic device.
  • the first electronic device is further configured to receive a second touch operation acting on the first interface; the first electronic device is further configured to perform a touch operation based on the second touch operation.
  • the touch parameters and the first display data determine the function triggered by the second touch operation; the first electronic device is further configured to obtain the third display content of the target application based on the function triggered by the second touch operation; the first electronic device , is further used for determining fourth display data based on the third display content and the screen display parameters of the first electronic device; the first electronic device is further used for displaying a fourth interface based on the fourth display data.
  • the first electronic device provides the target application with touch parameters (touch coordinates, input text, etc.) on the display of an electronic device. Wherein, operating the target application on the first electronic device does not affect the display interface of the second electronic device.
  • the system further includes a third electronic device; the screen display parameters include screen length and screen width; the first electronic device is further configured to acquire screen display parameters of the third electronic device, The screen length of the third electronic device is greater than the screen length of the second electronic device; the first electronic device is further configured to determine fifth display data based on the first display content and the screen display parameters of the third electronic device; the first electronic device , and is also used to send the fifth display data to the third electronic device; the third electronic device is used to display the fifth interface on the display screen of the third electronic device based on the fifth display data, and the first function control in the fifth interface The display length is greater than the display length of the first function control in the second interface.
  • a layout rule is exemplarily described here.
  • the display length of a control displayed on the third electronic device may be greater than the display length of the control displayed on the second electronic device.
  • Display length on That is, the display length of the control is positively related to the length of the display screen.
  • the embodiments of the present application also provide some layout rules, such as stretching, zooming, hiding, dividing, proportioning, wrapping, extending, and the like.
  • the first display content includes a map basemap and one or more function controls; the one or more function controls include a search box control; the second The displayed content includes historical search records; the first electronic device is further configured to determine, based on the touch parameters of the first touch operation and the second display data, that the first touch operation is a user operation for the search box control.
  • Carkit invokes corresponding methods and interfaces (such as the searchaddress method and the onsearchaddress interface) based on the touch parameters, and obtains the information from the map application.
  • the map application obtains the corresponding data based on the searchaddress method, and provides the data to CarKit through the onsearchaddress interface, and then CarKit makes a layout and displays it on the display screen of the second electronic device.
  • the second electronic device is further configured to receive a third touch operation acting on the third interface; the second electronic device is further configured to send the third touch operation to the first electronic device touch parameters; the first electronic device is further configured to determine, based on the touch parameters of the third touch operation and the third display data, that the second touch operation is a user operation for inputting the first text on the search box control; the first The electronic device is further configured to acquire first address information with the first text as the target location; the first electronic device is further configured to determine sixth display data based on the first address information and screen display parameters of the second electronic device; The first electronic device is further configured to send sixth display data to the second electronic device; the second electronic device is further configured to display a sixth interface on the display screen of the second electronic device based on the sixth display data.
  • the sixth display data includes the first address information and the start navigation control; the second electronic device is further configured to receive a fourth touch operation acting on the sixth interface; the second electronic device is further for sending touch parameters of the fourth touch operation to the first electronic device; the first electronic device is further configured to determine the fourth touch operation based on the touch parameters of the fourth touch operation and the sixth display data as For the user operation for starting the navigation control; the first electronic device is also used to obtain navigation information that takes the current position of the second electronic device as the departure place and the first address information as the destination; the first electronic device is also used for The seventh display data is determined based on the navigation information and the screen display parameters of the second electronic device; the first electronic device is further configured to send the seventh display data to the second electronic device; the second electronic device is further configured to send the seventh display data to the second electronic device based on the first electronic device. Seven display data A seventh interface is displayed on the display screen of the second electronic device.
  • the navigation information includes at least one of the following: the distance to the next intersection, the driving direction of the next intersection, the road name of the next intersection, the remaining distance to the destination, the driving speed, and the destination the time required to reach the destination, the remaining time to reach the destination, the real picture, the road condition, or the driving route information.
  • the above embodiment specifically describes the operation flow from the home page interface to the address search page interface to the navigation interface under the map application.
  • the first display content includes one or more pictures and one or more function controls; the one or more function controls include a start playing control;
  • the second display content includes playback progress indication information; the first electronic device is further configured to determine, based on the touch parameters of the first touch operation and the second display data, that the first touch operation is an operation for starting the playback control.
  • the first electronic device is further configured to send audio data corresponding to the second display content to the second electronic device; the second electronic device is further configured to play audio through the speaker of the second electronic device data.
  • the above embodiment specifically describes the operation flow from the home page interface to the music playing page interface under the music application.
  • the second electronic device is a vehicle-mounted terminal.
  • the first electronic device may be a mobile phone.
  • the present application provides an electronic device, comprising: one or more processors and one or more memories; the one or more memories are respectively coupled with the one or more processors; the one or more memories
  • the computer program code includes computer instructions; when the computer instructions are executed on the processor, the electronic device is made to execute the first electronic device or the first electronic device in any possible implementation manner of the first aspect above. 2.
  • an embodiment of the present application provides a computer storage medium, including computer instructions, which, when the computer instructions are run on an electronic device, enable a communication apparatus to perform application access in any possible implementation manner of the first aspect above method.
  • an embodiment of the present application provides a computer program product that, when the computer program product runs on a computer, enables the computer to execute the application access method in any possible implementation manner of the first aspect above.
  • FIG. 1 is a system schematic diagram of an application access method provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 3 is a software architecture diagram of an electronic device provided by an embodiment of the present application.
  • 4A is a method flowchart of an application access method provided by an embodiment of the present application.
  • FIG. 4B is a schematic flowchart of an application access method provided by an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a set of screen sizes provided by an embodiment of the present application.
  • FIG. 6A is a schematic flow chart of a map application access provided by an embodiment of the present application.
  • 6B is a flowchart of a method for accessing a map application provided by an embodiment of the present application.
  • FIG. 7 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIGS. 8A-8D are schematic diagrams of another set of interfaces provided by an embodiment of the present application.
  • FIG. 9 is another set of interface schematic diagrams provided by an embodiment of the present application.
  • FIGS. 10A-10B are schematic diagrams of another set of interfaces provided by this embodiment of the present application.
  • FIG. 11 is another set of interface schematic diagrams provided by this embodiment of the present application.
  • FIGS. 12A-12B are schematic diagrams of another set of interfaces provided by this embodiment of the present application.
  • FIG. 13 is a schematic flow chart of a music application access provided by an embodiment of the present application.
  • FIGS. 14A-14B are schematic diagrams of another set of interfaces provided by the embodiments of the present application.
  • 15A-15C are another set of interface schematic diagrams provided by the embodiments of the present application.
  • FIGS. 16A-16C are another set of interface schematic diagrams provided by this embodiment of the present application.
  • first and second are only used for descriptive purposes, and should not be construed as implying or implying relative importance or implying the number of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the “multiple” The meaning is two or more.
  • FIG. 1 exemplarily shows a schematic diagram of the architecture of a system 10 provided by the present application.
  • the system 10 may include: an electronic device 100 and an electronic device 200 .
  • the electronic device 100 and the electronic device 200 can communicate wirelessly through Bluetooth (blue tooth, BT), near field communication (near field communication, NFC), wireless fidelity (wireless fidelity, WiFi), WiFi direct connection, ZigBee, and account sharing. communicate by means of communication.
  • Bluetooth blue tooth
  • NFC near field communication
  • wireless fidelity wireless fidelity
  • WiFi WiFi direct connection
  • ZigBee ZigBee
  • the electronic device 100 and the electronic device 200 in the embodiment of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook , as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) ⁇ virtual reality (VR) devices, in-vehicle devices, in-vehicle terminals, watches, wristbands, etc. with touch screen (or display screen), the specific type of the electronic device is not particularly limited in this embodiment of the present application.
  • the electronic device 100 is a mobile phone and the electronic device 200 is a vehicle-mounted terminal as an example; the electronic device 200 integrates the HUAWEI HiCar SDK, and the HUAWEI HiCar SDK supports the ecological connection of the electronic device 200 accessing to the HUAWEI HiCar.
  • FIG. 2 exemplarily shows a schematic structural diagram of the electronic device 100 .
  • the electronic device 100 As an example, it should be understood that the electronic device 100 shown in FIG. 2 is only an example, and the electronic device 100 may have more or fewer components than those shown in FIG. 2, two or more components may be combined, or Different component configurations are possible.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, And a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • graphics processor graphics processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the controller may be the nerve center and command center of the electronic device 100 .
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and processor 110 latency is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for
  • the antenna 1 of the terminal 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the terminal 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • Camera 193 is used to capture still images or video.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 .
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker” is used to convert audio electrical signals into sound signals.
  • Receiver 170B also referred to as “earpiece”, is used to convert audio electrical signals into sound signals.
  • the microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
  • the earphone jack 170D is used to connect wired earphones.
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the magnetic sensor 180D includes a Hall sensor.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the temperature sensor 180J is used to detect the temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor 180K may pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 . Motor 191 can generate vibrating cues.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • An application access method provided by the embodiment of the present application provides an application template CarKit.aar for application manufacturers. Based on the application template, application manufacturers do not need to pay attention to the UI, but only need to implement the interface declared in CarKit.aar to develop By producing application software suitable for the electronic device 200, the development efficiency is greatly improved.
  • the application manufacturer completes the adaptation development of the target application according to CarKit.aar, installs and runs it in the electronic device 100, when the electronic device 100 and the electronic device 200 are successfully connected, the electronic device 100 obtains the screen size of the display screen of the electronic device 200, based on the electronic device 100. The screen size of the display screen of the device 200 and the display content of the target application.
  • the electronic device 100 draws a display interface adapted to the screen size, and projects the display content of the target application on the display screen of the electronic device 200.
  • the user can
  • the target application is operated on the electronic device 200, and the access of the target application on the electronic device 200 is completed.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 .
  • the Android system is only a system example of the electronic device 100 in the embodiment of the present application, and the present application can also be applied to other types of operating systems, such as IOS, windows, Hongmeng, etc., which is not limited in the present application.
  • the following only takes the Android system as an example of the operating system of the electronic device 100 .
  • FIG. 3 shows a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into three layers, which are an application layer, an application framework layer, and an operating system layer from top to bottom.
  • the application layer can include a series of application packages.
  • the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, game, shopping, travel, instant messaging (such as short message).
  • the application package may also include: the main screen (ie the desktop), the negative screen, the control center, the notification center and other system applications.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include input manager, window manager, content provider, view system, telephony manager, resource manager, notification manager, display manager, activity manager (activity manager) etc.
  • the application framework layer is illustrated by taking a window manager, an activity manager, a content provider, a view system, and a carkit module as an example.
  • the activity manager is used to manage the activities running in the system, including process, application, service, task information and so on.
  • the activity manager starts a task stack correspondingly, and a task stack includes one or more activities.
  • the electronic device 100 runs an application and starts the task stack of the application.
  • an activity (activity1) is activated, which is displayed on the front of the display screen 194 and is at the top of the task stack (the top of the Activity stack).
  • activity1 is in an active state (active/running) that is visible and can interact with the user; when the electronic device 100 receives a user operation, it needs to display a new application interface, and a new activity (activity2) is placed in the task the top of the stack.
  • activity2 is a non-full-screen application interface or a transparent application interface, that is, activity2 does not cover activity1 or does not completely cover activity1
  • activity1 is in a paused state (Paused)
  • activity1 remains connected to the window manager to keep all data. and is visible on the display screen 194, but has not been able to interact with the user.
  • activity1 will be forcibly terminated (killed); if activity2 completely covers activity1, activity1 is in a stopped state (Stopped) at this time, and activity1 retains all data but is not visible on the display screen 194 , when the system memory of the electronic device 100 is insufficient, the activity in the stopped state is terminated prior to the activity in the suspended state. It should be noted that when the application is closed, all activities in the application's task stack are also terminated.
  • the electronic device 100 runs a target application, and the target application supports being displayed on two electronic devices at the same time, and a user can operate the same application software on the two electronic devices.
  • the target application corresponds to two sets of activity instances, one set can be displayed on the display screen 194 of the electronic device 100 , and the other set can be displayed on the display screen of the electronic device 200 .
  • the two sets of activity instances do not interfere with each other.
  • the target application can obtain the corresponding Context from the Activity of the electronic device 100 or the Activity of the electronic device 200, and use the corresponding Context on different display screens to obtain the loading and access resources of the target application. .
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc. It can also be used to control the appearance and position of windows and provide users with methods to operate these window programs.
  • the window manager obtains the screen size of the display screen of the electronic device 200 and determines the size and position of the window displayed on the display screen of the electronic device 200 .
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the content provider obtains the display content provided by the application program, and draws it on the display screen of the electronic device 100 and the display screen of the electronic device 200 by the view system.
  • the carkit module provides corresponding interfaces for the applications in the application layer, and the functions of the electronic device 200 to obtain the displayed content of the application and to control the service are realized through the interface provided by the carkit module.
  • the embodiments of the present application take map applications and music applications as examples, and exemplarily provide a carmapkit module and a carmusickit module, wherein the carmapkit module provides a corresponding interface for the map application, and the interaction between the map application and the electronic device 200 is realized through the interface; for example
  • the electronic device 100 obtains the display content of the map application through the interface provided by the carmapkit module, and displays it on the display screen of the electronic device 200; for another example, when the user operates the map application on the electronic device 200, the electronic device 100 sends the map to the map through the interface provided by the carmapkit module.
  • the application initiates the execution of the corresponding service.
  • the carmusickit module provides a corresponding interface for the music application, and the interaction between the music application and the electronic device 200 is realized through the interface.
  • the carkit module is also used to lay out the acquired display content. Based on the screen display parameters of the display screen of the electronic device 200, the carkit module performs layouts such as stretching, scaling, hiding, dividing, wrapping, and extending the acquired display content (buttons, text, pictures, etc.).
  • the input manager is used to receive commands or requests as reported by the operating system layer.
  • the display manager is used to transfer display content to the operating system layer.
  • the phone manager is used to provide the communication function of the electronic device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, text information is prompted in the status bar, a prompt sound is issued, the electronic device vibrates, and the indicator light flashes.
  • the operating system layer provides hardware management functions for managing and allocating various resources (CPU, memory, input and output devices, display screen, speakers, microphones, etc.) of the electronic device 100 used by the application program. For example, when an application needs to be run, the operating system calls it into memory, and allocates memory space for the application to run and store data. In another example, when an application needs to display an application interface, the operating system calls the display device (eg, the electronic device 200 ) to provide the application with a control service and the like on the display device. In this embodiment of the present application, the electronic device 100 establishes a connection with the electronic device 200 , and the application program in the electronic device 100 can use the hardware resources of the electronic device 200 .
  • resources CPU, memory, input and output devices, display screen, speakers, microphones, etc.
  • FIG. 4A is a schematic flowchart of an application access method according to an embodiment of the present application.
  • Step S10 The electronic device 100 and the electronic device 200 establish a connection.
  • the electronic device 100 establishes a connection with the electronic device 200 through Bluetooth (blue tooth, BT), near field communication (near field communication, NFC), wireless fidelity (wireless fidelity, WiFi), WiFi direct connection, ZigBee and account sharing, etc. Communicate wirelessly.
  • the electronic device 100 may be referred to as a first electronic device, and the electronic device 200 may be referred to as a second electronic device.
  • step S12 may be before step S10, or may be after step S10.
  • Step S11 The electronic device 100 starts the target application.
  • the electronic device 100 runs the target application;
  • the electronic device 200 sends a message to the electronic device 100, instructing the electronic device 100 to run the target application.
  • Step S12 carkit acquires screen display parameters of the electronic device 200 .
  • the execution sequence of step S12 may be after step S11 or after step S10.
  • the carkit module of the electronic device 100 acquires the screen display parameters of the electronic device 200.
  • the screen display parameters include the actual screen display length and width of the display screen of the electronic device 200 , that is, the visible screen size.
  • the screen display parameters may also include parameters such as the resolution of the display screen of the electronic device 200 .
  • Step S13 carkit acquires the display content of the home page interface.
  • Carkit obtains the display content of the homepage interface from the target application.
  • the display content of the homepage interface includes the map base map, search button or shortcut address button, etc.
  • the display content of the homepage interface includes recommendations Songs, a search button or a play button, etc.
  • the display content of the home page interface may be referred to as the first display content.
  • Step S14 carkit determines the second display data according to the display content of the home page interface and the screen display parameters of the electronic device 200 .
  • the second display data is display data adapted to the display screen of the electronic device 200, and elements in the second display data are obtained based on the acquired display content of the home page interface.
  • Step S15 Based on the second display data, the electronic device 200 projects the screen to display the second interface.
  • the electronic device 100 projects a screen to the electronic device 200 to display the second interface, and the display screen of the electronic device 200 displays the second interface, wherein the second interface is displayed in full screen on the display screen of the electronic device 200 .
  • the user can use the target application through the application interface displayed by the electronic device 200 .
  • the electronic device 100 starts the target application, the electronic device 100 obtains the display content of the homepage interface, draws the interface through the view system, and displays the first interface, ie, the homepage interface of the target application, on the display screen of the electronic device 100 .
  • the layouts of the display interface of the electronic device 100 and the display interface of the electronic device 200 are also different.
  • the electronic device 100 runs the target application in the background, and the target application can still be used normally through the application interface displayed by the electronic device 200 .
  • Step S16 The electronic device 200 receives a user operation for the second interface.
  • Step S17 carkit monitors the user operation.
  • Step S18 The carkit acquires the display content of the secondary interface of the second interface.
  • Steps S16 to S18 describe the execution manner of the electronic device 200 acquiring the display content from the target application.
  • the user operation is used to enter the secondary interface of the second interface.
  • the target application is a map application.
  • the second interface displayed by the electronic device 200 includes a shortcut address button. The user clicks the shortcut address button, and cartit monitors the user operation. Obtain corresponding display content from the map application based on the user operation.
  • Step S19 the carkit determines the second display data according to the display content of the secondary interface and the screen display parameters of the electronic device 200 .
  • Step S20 Based on the third display data, the electronic device 200 projects a screen to display a third interface.
  • the third display data is display data adapted to the display screen of the electronic device 200, and the elements in the third display data are obtained based on the acquired display content of the secondary interface.
  • the electronic device 100 projects a screen to the electronic device 200 to display the third interface, and the display screen of the electronic device 200 displays the third interface.
  • the target application can actively update or switch the application interface. For example, the target application monitors screen events at the top layer, and updates the current application interface if the target application does not receive user operations for a long time. At this time, the target application sends instruction information and provides display data to carkit, instructing carkit to draw a new display interface, and display the screen on the display screen of the electronic device 200 . CarKit and the target application complete the interaction with the user according to this logic of control and reverse control.
  • the activity mentioned in the embodiments of this application is an application component, which is used to realize the interaction between the electronic device 100 and the user.
  • An activity provides an application interface, and the electronic device 100 can respond based on events triggered by the user in the application interface.
  • the electronic device 100 runs a target application, and the electronic device 100 supports the target application to be displayed on the display screens of the electronic device 100 and the electronic device 200 at the same time, so that the user can operate the same application on the electronic device 100 and the electronic device 200 at the same time. application.
  • the electronic device 100 Since the screen sizes of the display screen of the electronic device 100 and the display screen of the electronic device 200 are different, the electronic device 100 starts two sets of activity instances, one set is used to display on the display screen of the electronic device 100, and the other set is used to cast the screen to display on the electronic device. 200 on the display.
  • the target application needs to isolate the activity displayed on the electronic device 100 and the activity displayed on the electronic device 200 (including the activity used for jumping), that is, the target application needs to be on the mobile phone and the vehicle terminal. Use two completely different sets of Activity instances. This means that there will be two sets of Contexts inside the target application, the electronic device 100 manages the two sets of Contexts separately, and the target application uses corresponding Contexts on different screens.
  • the target application is the application software adapted to the application template CarKit.
  • the application manufacturer does not need to pay attention to the UI, but only needs to implement the interface declared in CarKit.aar, and then the electronic device 100 can be integrated
  • the target application is connected to the electronic device 200 , and the UI interface can adapt to the screen of the electronic device 200 .
  • Session, Controller, and UI are the functional scope of the CarKit application template.
  • This application provides the vehicle terminal application development template CarKit.
  • CarKit includes one or more defined Session interfaces and callable methods/functions .
  • the target application integrates the development kit in the electronic device 100, and then implements the interface of the Session.
  • the user interaction interface is carried by Activity, and the interface layout changes accordingly with the screen size.
  • the data required by the interface ultimately calls the interface in Session.Callback, which is implemented by the application manufacturer (target application). If the application manufacturer wants to change the data or state, etc., it can call the method in the Session, get the Controller, and then control the business process. If the user wants to change the data or state, etc., the Activity will detect the user operation triggered by the user, and the display interface will also change accordingly. Specific steps are as follows:
  • the target application integrates CarKit in the Application project, completes the interface defined in Session.Callback when the application is created, and registers with CarKit.
  • the OnqueryData interface in Session.Callback shown in FIG. 4B is used to query information or data in the target application.
  • step 101 is a step performed during the installation of the target application, or a step performed when the target application is run for the first time.
  • steps 102 to 104 describe the implementation process of the user interaction interface acquiring data from the target application.
  • the application interface drawn in CarKit is displayed on the display screen of the electronic device 200 , and various callbacks of the target application are triggered to obtain the data required by the application interface and draw the application interface.
  • the callback refers to that the target application passes a method or function to CarKit through a parameter, so that CarKit can call the target application through the method or function.
  • CarKit listens to an event that occurs in the user interaction interface, calls the corresponding interface (such as interface 1) in Session.callback based on the method corresponding to the event (such as method 1), and obtains the required data from the target application.
  • Query data based on this method (method 1), and return the query result through this interface (interface 1).
  • the activity corresponding to the homepage interface of the target application calls the queryData method in the Controller to call the OnqueryData interface, and obtains the interface content of the homepage interface from the target application through the OnqueryData interface, and the target application obtains the interface content of the homepage interface based on the queryData method.
  • the interface content of the home page interface is sent to CarKit through the OnqueryData interface.
  • the Activity of the target application monitors data or state changes, for example, monitors the user operation triggered by the user on the home page to enter the secondary interface, and calls the corresponding secondary interface in the Controller.
  • the method calls the corresponding interface, and obtains the interface content of the secondary interface from the target application through the corresponding interface.
  • the target application obtains the interface content of the secondary interface based on the corresponding method, and sends it to CarKit through the corresponding interface.
  • the target application invokes the method interface to provide data; 106, invokes the interface to provide data; 107, updates the corresponding UI interface.
  • steps 105 to 107 describe the implementation process of the target application actively updating/switching the current user interface.
  • the target application can call the methods in the Controller through the Session to operate various services.
  • CarKit and the target application complete the interaction with the user according to this logic of control and reverse control.
  • the target application monitors the screen click event at the top layer, and can update or switch the application interface by calling the interface provided by CarMapKit. If there is no click on the screen for a long time, the current application interface is updated. At this time, the target application calls the changedata method in Session.Callback shown in FIG. 4B , and provides the interface data to be updated to CarKit through the onchangedata interface in the Controller.
  • the target application supports being displayed on the screens of the electronic device 100 and the electronic device 200 at the same time, so that the user can operate the same application on the electronic device 100 and the electronic device 200 at the same time.
  • the target application uses this capability, the following configuration needs to be added to the AndroidManifest file of the target application:
  • the user after the electronic device 100 establishes a connection with the electronic device 200, the user usually operates the target application through the electronic device 200, and the electronic device 100 may enter a screen-off/screen-locking state. At this time, the target application can still be used normally through the application interface displayed by the electronic device 200 .
  • the target application needs to find the Activity used for the screen display of the electronic device 200, and the following code is added to the onCreate() method:
  • the timing for establishing the connection between the electronic device 100 and the electronic device 200 may be before running the target application or after running the target application.
  • the application category of the target application may include: map application, music application, news application, service application (driving care, car service), entertainment application (video, game), and the like.
  • FIG. 4B is a general drawing method, which is only used as a schematic diagram of the architecture, and the actual implementation depends on the actual application.
  • the method name queryData in FIG. 4B in a map application, the method name may be called queryAddress, queryPath, etc., and in a music application, queryData may be a method such as querySongs.
  • CarKit provides the ability to draw and render the UI interface of the target application.
  • the electronic device 100 acquires the screen display parameters of the display screen of the electronic device 200, draws the application interface displayed on the display screen of the electronic device 200 according to the screen display parameters of the display screen of the electronic device 200 and the acquired interface data of the target application, The screen is displayed on the display screen of the electronic device 200 .
  • the application access method provided by the present application is described in detail by taking the electronic device 100 as a mobile phone, the electronic device 200 as a vehicle-mounted terminal, and the target applications as map applications and music applications as examples.
  • FIG. 5 exemplarily shows 3 different sizes of vehicle terminal screens, namely screen 1 with an aspect ratio of 24:9, screen 2 with an aspect ratio of 21:9, and a screen with an aspect ratio of 21:9. Screen 3 for 9:16.
  • the embodiment of the present application may also call the screen 1 a wide screen, the screen 2 a narrow screen, and the screen 3 a high screen.
  • Embodiment 1 map application access.
  • CarMapKit provides one or more functions of layout, container, and data transmission channel for map applications.
  • the specific data in the layout and container are passed in by the map application.
  • the map application and CarMapKit use the data transmission channel to exchange data and conduct data transmission. Forward or reverse control.
  • the application manufacturer integrates CarMapKit in the installation package of the map application.
  • the map application starts two sets of activity instances. activity).
  • Phoneactivity is associated with the hardware resources on the mobile phone
  • caractivity is associated with the hardware resources on the vehicle terminal.
  • CarMapKit corresponds to caractivity.
  • CarMapKit divides the map application interface into two layers: the map layer, which is provided by the map application; the interactive layer, which is provided by CarMapKit.
  • the map application needs to integrate the above two layers into one caractivity, and project the screen to the display screen of the vehicle terminal.
  • the map layer is provided by the map application, and the user clicks on the basemap or slides on the basemap, and such events are monitored by the map application.
  • the interactive layer is provided by CarMapKit, and CarMapKit listens to the user's click event, and then can actively jump to a certain interface, or notify the map application to let the map application actively jump to a certain interface.
  • map applications only need to focus on map data provision and map navigation service processing, and do not need to pay attention to, for example, on-board terminal screen resolution adaptation, car knob and joystick adaptation, etc.
  • the map application can complete the data transfer and data control of the interactive layer by calling the interface provided by CarMapKit.
  • CarMapKit provides the following classes for map applications:
  • CarMapKit uses the data provided by the map application to draw the upper-level interaction layer interface.
  • the map application needs to register the Callback class for CarMapKit to call.
  • Controller class CarMapKit map applications sometimes need to actively call the business capabilities of CarMapKit, and CarMapKit provides corresponding Controllers for map applications to call.
  • NavigationSessionMgr This class is used to manage the Callback registered by the map application and the Controller provided by CarMapKit.
  • the map application needs to correctly initialize the NavigationSession provided by CarMapKit and register various Callback interfaces to call back data when the Application of its own application is initialized.
  • FIG. 6A exemplarily shows the interaction flow between the map application and the carmapkit.
  • the mobile phone runs the map application;
  • the vehicle terminal sends a message to the mobile phone, instructing the mobile phone to run the map application.
  • the map application creates an Application project, introduces CarMapKit.aar, then implements the Session.Callback interface in CarMapKit, and finally registers the specific implementation of Session.Callback in the Session in the onCreate method of the Application.
  • For map applications there is no need to pay attention to the application interface, just implement the Session.Callback interface and provide data. If the map application wants to actively control the user interface, call the open method in Session.
  • the map application can implement 8 callback interface classes in the initialization of the Application, which are:
  • IAddressCallback address-related interface class, CarMapKit will call back through this interface to obtain various address-related data, such as search address, recommended address and other address information;
  • ICustomViewCallback Custom view related interface class
  • IHiCarLifeCallback An interface class related to the HiCar life cycle, through which the hicar of the map application is instructed to start and exit, and hicar is a connection method between the mobile phone and the vehicle terminal;
  • INavigationStateCallback interface class related to navigation state, CarMapKit will query path information through this interface
  • IRouteCallback interface class related to routing
  • ISettingCallback Set the relevant interface class. When entering the setting state, CarMapKit will obtain the full amount of setting information through this interface;
  • IThemeChangeCallback theme-related interface class, when the theme changes, the map application will be notified through this interface, for example, two sets of black and white themes are currently supported;
  • IToolCallback Toolbar-related interface class
  • CarMapKit will query the toolbar on the map to display the required information through this callback.
  • FIG. 6A exemplarily shows the OnGetMapRootView, OnQueryToolButton, OnSearchAddress, OnQueryQuickAddressButton, OnQuerypath, OnStartNavigation and other interfaces implemented by the map application and registered in the Session.
  • OnGetMapRootView belongs to the address-related interface class, which is used to obtain the map
  • OnQueryToolButton belongs to the toolbar-related interface class, which is used to obtain the buttons/icons that need to be displayed on the toolbar on the map
  • OnSearchAddress belongs to the address-related interface class, which is used for searching Address
  • OnQueryQuickAddressButton belongs to the address-related interface class and is used to obtain the button of the shortcut address that needs to be displayed on the map
  • OnQuerypath belongs to the address-related interface class, which is used to query the path
  • OnStartNavigation belongs to the navigation state-related interface class, which is used to enable the navigation state .
  • the layout of CarActivity can be basically divided into three layers.
  • the bottom layer is the map basemap view
  • the middle layer is the fragment of CarMapKit
  • the top layer is the top-level UI made by the map application according to its own business.
  • the map basemap is at the bottom layer;
  • the UI layer of CarMapKit is in the middle layer, and the map application can load the fragments of CarMapKit through the dynamic loading method of Fragment.
  • CarMapKit is displayed in full screen, and the fragment can represent the behavior or user interface part of the carActivity.
  • the UI of CarMapKit is dynamically loaded by carActivity in the form of fragments.
  • the application inherits CarActivity from FragmentActivity.
  • CarActivity uses CarMapKit, it needs to initialize the configuration of Activity to car mode.
  • the configuration initialization can be done in the attachBaseContext method of the Activity. Since the interface of CarMapKit to obtain the theme needs to pass in the context, and in the attachBaseContext method, the context of the Activity has not been initialized, so the context of the application needs to be used in this method.
  • steps 202 to 204 describe the implementation process in which the user interface obtains data from the map application, and the map application returns the data through Session.callback.
  • CarMapKit exposes the upper-layer client interface elements to the map application in the form of a data model.
  • the map application transfers the raw data required by CarMapKit to CarMapKit according to the standard data structure for drawing the upper-layer client interface.
  • the interface drawn in CarMapKit is displayed on the display screen of the electronic device 200.
  • CarMapKit will call the service callback registered by the map application, thereby notifying the user of the map application what event is triggered.
  • map application when the map application is just started, it needs to obtain the map's basemap and tool list and other information, it will call the getMapRootView and queryToolButton methods in the controller, these two methods will call the ongetMapRootView interface of the map application in Session.Callback and onqueryToolButton interface to get data from the map application.
  • the acquired data on the map home page is loaded into the interface layout and container, and after the home page interface is drawn, it is completely presented on the display screen of the electronic device 200 .
  • the basemap (map layer) of the map is provided by the map application.
  • the upper layer of the interface (interaction layer) on the map is provided by CarMapKit.
  • CarMapKit listens to the user's click event, and then can actively jump to an interface, or notify the map application to let the map application actively jump to a certain interface.
  • the interactive layer can include elements such as a search box and a shortcut address control.
  • the user clicks the search box on the home page to enter the address search page interface.
  • CarMapKit listens to the click event, and CarMapKit obtains the address search page from the map application.
  • the interface data required by the interface for example, through the searchaddress method in the Controller, the input parameter is null, and the map application queries the historical search records of the map application based on this parameter.
  • CarMapKit monitors the text change in the search box, and CarMapKit obtains the address information with the text as the keyword (target location) from the map application. For example, if the user enters "Huawei District A”, CarMapKit uses the searchaddress method in the Controller to The input parameter is "Huawei Area A”, and the map application queries the address information of "Huawei Area A” based on this parameter and returns it to CarMapKit.
  • the interactive layer can include elements such as the start navigation control.
  • CarMapKit listens to the click event, and CarMapKit obtains from the map application the current position of the electronic device 200 as The starting point, "Huawei Area A" is the navigation information of the destination.
  • the navigation information can include: the distance to the next intersection, the driving direction of the next intersection, the road name of the next intersection, the remaining distance to the destination, the driving speed, Time required to reach the destination, remaining time to reach the destination, live pictures, road conditions, or driving route information, etc.
  • steps 202 to 204 describe the implementation process of the map application updating/switching the current user interface.
  • the map application can actively use the Controller provided by CarMapKit to control the upper-level client interface. If the map application needs to actively initiate business processes such as navigation, changing routes, and sending notifications, it can call the open methods in the Session of CarMapKit to obtain the Controller, and then control the business process of the map.
  • FIG. 6A exemplarily shows the OnStartNavigation, OnPathchanged, OnNotification and other interfaces registered in the controller by the map application. Among them, OnStartNavigation is used to open the navigation state; OnPathchanged is used to change the path; OnNotification is used to provide notification information.
  • map application when the map application is just started, it needs to obtain information such as the basemap and tool list of the map. It will call the getMapRootView and queryToolButton methods in the controller. These two methods will call the ongetMapRootView interface of the map application in Session.Callback. Interface with onqueryToolButton to get data from the map application.
  • the acquired data on the map home page is loaded into the interface layout and container, and after the home page interface is drawn, it is completely presented on the display screen of the electronic device 200 .
  • CarMapKit provides three address information element encapsulation classes for map applications to use. Below we introduce the three address element encapsulation classes and their scope of use in turn:
  • AddressInfo The most basic address element, mainly used for location selection and display of recommended address information. This type of address has the following information: Address ID: a globally unique address identifier. Address Name: The name information of the address. Address additional information: used to display the additional information of the address, such as the abbreviated introduction of the address, the time and distance to the address and other information.
  • IconAddress Inherited from AddressInfo, it is mainly used for the historical information of the search address of the search page or the display of the searched address information. Compared with AddressInfo, an attribute is added: address icon information: the icon display of the address element used for the search page interface.
  • Map selection address inherited from AddressInfo, mainly used for Point of Information (POI) map to display the detailed information of the selected location. Compared with AddressInfo, two attributes are added: the third priority Subtext: used for display The third priority paratext message for the location.
  • CarMapKit provides IAddressTransportControl for map applications to use.
  • the map application can actively recommend an address information to the user when the navigation is idle, or when the user clicks the map to select the selected point when the navigation is idle Address details are displayed to the user.
  • FIG. 6B exemplarily shows the business interaction process of searching for address information.
  • Step S30 A home page interface of the map application is displayed on the display screen of the electronic device 200, and the home page interface includes a search box control.
  • the home page interface consists of two layers: the map layer (including the basemap of the map) and the interactive layer (including one or more controls).
  • the basemap of the map is provided by the map application. The user clicks on the basemap or slides on the basemap, and such events are monitored by the map application.
  • the interactive layer is provided by CarMapKit, and CarMapKit listens to the user's click event, and then can actively jump to a certain interface, or notify the map application to let the map application actively jump to a certain interface.
  • the target application is a map application
  • the home page interface for displaying the map application on the display screen of the electronic device 200 may be referred to as a second interface.
  • Step S31 carmapkit listens to the click event for the search box control.
  • carmapkit listens to the click event (the first touch operation) for the search box control.
  • Step S32 query the historical search record of the map application through the onsearchaddress method of session.callback, and the input parameter address is null.
  • CarMapKit obtains the interface data required for the address search page interface from the map application. By calling the searchaddress method of the controller and the onsearchaddress interface of session.callback, the historical search records of the map application are called.
  • the input parameter address is null.
  • Step S33 The map application returns the query result.
  • the map application Based on the searchaddress method, the map application performs a query with the parameter null, and returns the query result through the onsearchaddress interface of session.callback, which is the historical search record of the map application.
  • the query result may also be referred to as the second display content.
  • Step S34 carmapkit layouts the address search page interface of the map application. Based on the query result and the screen display parameters of the vehicle terminal, carmapkit lays out the address search page interface of the map application, and determines the third display data.
  • Step S35 an address search page interface is displayed on the display screen of the electronic device 200 .
  • the electronic device 200 displays an address search page interface on the display screen based on the third display data, and the address search page interface may be referred to as a third interface.
  • Step S36 The input event for the search box control is monitored, and the input text is the first text.
  • carmapkit monitors the input event (second touch operation) for the search box control, and recognizes that the input text is the first text.
  • Step S37 query the address information with the first text as the target address through the onsearchaddress method of Session.callback, and the input parameter address is the first text.
  • CarMapKit obtains the interface data required for the address information page interface from the map application. By calling the searchaddress method of the controller and the onsearchaddress interface of session.callback, the historical search records of the map application are called.
  • the input parameter address is the first text entered by the user, or the A parameter indicating this first text.
  • Step S38 The map application returns the query result.
  • the map application Based on the searchaddress method, the map application performs a query with the parameter as the first text, and returns the query result through the onsearchaddress interface of session.callback.
  • the query result is the address information of the map application with the first text as the first target address.
  • Step S39 carmapkit layouts the address information page interface of the map application. Based on the query result and the screen display parameters of the vehicle terminal, carmapkit lays out the address information page interface of the map application, and determines the sixth display data.
  • Step S40 displaying the address information page interface on the display screen of the electronic device 200 .
  • the electronic device 200 displays an address information page interface on the display screen based on the sixth display data, and the address information page interface may be referred to as a sixth interface.
  • Step S41 listening to the POI point selection event for the address information page interface.
  • the map application listens to the point selection event for the map basemap.
  • Step S42 Send address information of the selected address through the showselectaddress interface of addresstransportcontrol.
  • the map application identifies the target point of the point selection event, and sends the detailed address information of the target point selected by the user through the showselectaddress interface of addresstransportcontrol.
  • the address information page interface of the target point is laid out by carmapkit, and the address information page interface of the target point is displayed on the display screen of the electronic device 200 .
  • the address information page interface for displaying the target point on the display screen of the electronic device 200 may be referred to as a sixth interface.
  • carmapkit obtains seventh display data from the map application, and displays a navigation interface (seventh interface) based on the seventh display data.
  • the map application monitors the screen click event (which may be other business logic) at the top layer, and can display and hide information on the interface by calling the interface provided by CarMapKit. For example, in the driving mode, if the screen of the vehicle terminal does not receive a click action within a preset time, the toolbar will be hidden, and the toolbar will be displayed when there is a click event.
  • the screen click event which may be other business logic
  • CarMapKit divides the map business into the following six business states: Search state (SEARCH_STATE): used to provide users with the ability to search for addresses and quick address searches; Navigation idle state (NAVIGATION_IDLE_STATE): used for maps when no navigation task is initiated Display of the main page; address selection status (ADDRESS_SELECT_STATE): used to display a series of addresses for the user to choose; navigation path selection status (ROUTE_SELECT_STATE): used to display the optional route for navigating to the destination selected by the user; navigation in progress status (NAVIGATION_ONGOING_STATE ): used to display the real-time information of the current user's navigation, including inducement cards and various custom Views; setting status (NAVIGATION_SETTING_STATE): used to show the user a list of settings supported by the map application.
  • Search state SEARCH_STATE
  • Navigation idle state NAVIGATION_IDLE_STATE
  • ADRESS_SELECT_STATE used to display a series of
  • CarMapKit requires that the map application must implement the INavigationStateCallback interface and register this business callback with NavigationCallback. Through this callback, CarMapKit can notify the map application that the business state has changed.
  • CarMapKit provides map application interface drawing and rendering capabilities.
  • the data required by CarMapKit will be requested from the map application through the Callback class registered above, and the map application can also control the business process of CarMapKit through the Controller class.
  • CarMapKit can receive and recognize voice commands in addition to providing the ability to render the map application interface.
  • the corresponding button can be triggered. For example, there is a search button on the home page of the map.
  • search button on the map is equivalent to being clicked, and then automatically enters the address search page.
  • the map application needs to listen to the onKeyDown method of the Activity, and then pass this event to CarMapKit for processing.
  • the onKeyDown method can be understood as an event that captures the pressing of the mobile phone keyboard.
  • the display form of the map application on the application interface of the electronic device 100 and the electronic device 200 is exemplarily shown below.
  • the layout adaptation method is mainly used for the adaptive layout capability of the same application interface under different screen sizes, including stretching, zooming, hiding, dividing, proportioning, folding, extending, etc.
  • stretching refers to;
  • the number can be changed with the change of the display width; the equalization means that the elements in the interface divide the space between each element equally according to the number; the proportion means that the missing elements in the interface occupy a certain proportion of the display interface;
  • Line wrapping refers to the positional relationship between two elements. Choose whether these two elements are left-right or top-bottom layout according to the width of the two elements; extension refers to the number of elements displayed in the interface according to the actual situation, and the complete display is not displayed. The section can be scrolled to reveal more. It can be understood that the above-mentioned layout adaptation method is only an exemplary enumeration, and the present application does not limit the layout adaptation method of the application interface.
  • the display forms on different screens are respectively described by way of example with the home page interface, the address search page interface and the navigation page interface of the map application.
  • FIG. 7 exemplarily shows the home page interface 410 of the map application on the electronic device 100 .
  • the home page interface 410 may include a map 401 , a status bar 402 , an address bar 403 , controls 404 to 406 , and a toolbar 407 . in,
  • Status bar 402 may include: one or more signal strength indicators 402A for mobile communication signals (also known as cellular signals), one or more signal strength indicators 402B for wireless fidelity (Wi-Fi) signals , battery status indicator 402C, time indicator 402D.
  • signal strength indicators 402A for mobile communication signals (also known as cellular signals)
  • signal strength indicators 402B for wireless fidelity (Wi-Fi) signals
  • battery status indicator 402C for wireless fidelity (Wi-Fi) signals
  • time indicator 402D time indicator
  • the address bar 403 includes a search box, and two shortcut addresses (home address and business address).
  • the search box can be used to receive the destination name input by the user; the shortcut address "go home” is associated with an address preset by the user, when the electronic device 100 receives a user operation for "go home", the electronic device 100 provides the corresponding address Information; the shortcut address "going to the company” is associated with an address preset by the user. When the electronic device 100 receives a user operation for "going to the company", the electronic device 100 provides corresponding address information.
  • Control 404 provides a selection function for voice packs.
  • Control 405 is used to obtain the current location of electronic device 100 on map 534 .
  • Control 406 is used to zoom the size of map 401 .
  • Toolbar 407 includes one or more functional controls that provide functions such as making calls, playing music, and the like.
  • the electronic device 100 may also acquire screen display parameters of the electronic device 200, and then determine the location of each control or module through calculation.
  • FIGS. 8A to 8C exemplarily show display effect diagrams of the home page interface of the map application on screens of different sizes. Although the display forms of the home page interface are different, the data required by the home page interface are the same, and the same interface of the Session is called.
  • FIGS. 8A to 8C exemplarily show the home page interface of the map application on the electronic device 200 .
  • FIG. 8A exemplarily shows the home page interface 510 of the map application on the electronic device 200; the home page interface 510 may include a map 501, an address bar 511, controls 513 to 515, Toolbar 512.
  • the description of the map 501 , the address bar 511 , the controls 513 to 515 , and the toolbar 512 may refer to the relevant descriptions of the map 401 , the address bar 403 , the controls 404 to 406 , and the toolbar 407 in FIG. 7 .
  • the display contents of the home page interface 410 of the electronic device 100 and the home page interface 510 of the electronic device 200 are substantially the same, but the display forms are different.
  • the toolbar 512 is displayed on the left side of the map 501
  • the toolbar 407 is displayed below the map 401 .
  • FIG. 8B exemplarily shows the home page interface 520 of the map application on the electronic device 200; the home page interface 520 may include a map 502, an address bar 521, controls 523 to 525, Toolbar 522.
  • the description of the map 502, the address bar 521, the controls 523 to 525, and the toolbar 522 may refer to the relevant descriptions of the map 401, the address bar 403, the controls 404 to 406, and the toolbar 407 in FIG. 7.
  • FIG. 8C exemplarily shows the home page interface 530 of the map application on the electronic device 200; the home page interface 530 may include a map 503, an address bar 531, controls 533 to 535, Toolbar 532.
  • the description of the map 503 , the address bar 531 , the controls 533 to 535 , and the toolbar 532 may refer to the relevant descriptions of the map 401 , the address bar 403 , the controls 404 to 406 , and the toolbar 407 in FIG. 7 .
  • the home page interface 510, home page interface 520, and home page interface 530 have substantially the same display content, but different display forms.
  • the display widths of the address bar 511 and the address bar 521 are different.
  • the display width of the address bar is related or proportional to the width of the screen.
  • the display positions of the toolbar 512 are different.
  • toolbar 512 is displayed to the left of map 401 and toolbar 532 is displayed below map 503 .
  • the display form (display position, display size, etc.) of the toolbar 512, the toolbar 522, and the toolbar 532 may also be determined in other ways.
  • the style of the home page interface is specified as follows, the display screen is divided according to the golden ratio, if there are controls or modules displayed on the left side of the display screen, the width of the controls or modules on the left does not exceed the divided left area, Optionally, the width of the control or module on the left changes according to the actual width of the screen. As shown in FIG. 8D , the display screen is divided into left and right regions according to the golden ratio (0.618:1), and the controls displayed in the left region cannot exceed the left region. Optionally, the same is true on the right side, and details are not repeated here.
  • FIG. 9 exemplarily shows an address search page interface 610 of a map application on the electronic device 100 .
  • the address search page interface 610 may include a search bar 611, a shortcut control bar 613, a toolbar 612, and one or more address lists. in,
  • the search bar 611 may receive the destination name input by the user in the search bar 611, and receive the user's input operation for the search control.
  • the shortcut control bar 613 provides one or more shortcut controls, and each shortcut control corresponds to one or more addresses, for example, it may correspond to an address favorited by a user, an address indicating going to a parking lot, an address indicating going to a gas station, and so on.
  • Toolbar 612 includes one or more functional controls that provide functions such as making calls, playing music, and the like.
  • the electronic device 100 may also acquire screen display parameters of the electronic device 200, and then determine the location of each control or module through calculation.
  • FIGS. 10A-10B exemplarily show the display effect diagrams of the address search page interface of the map application on screens of different sizes. Although the display forms of the address search page interface are different, the data required by the address search page interface are the same, and the same interface of the Session is called.
  • FIGS. 10A to 10B exemplarily show the address search page interface of the map application on the electronic device 200 .
  • FIG. 10A exemplarily shows the address search page interface 620 of the map application on the electronic device 200;
  • the address search page interface 620 may include a search bar 621, a shortcut control bar 623, Toolbar 622, and one or more address lists.
  • the description of the search bar 621, the shortcut control bar 623, and the toolbar 622 may refer to the relevant descriptions of the search bar 611, the shortcut control bar 613, and the toolbar 612 in FIG. 9 above.
  • FIG. 10B exemplarily shows the address search page interface 630 of the map application on the electronic device 200;
  • the address search page interface 630 may include a search bar 631, a shortcut control bar 633, Toolbar 632, and one or more address lists.
  • the description of the search bar 631 , the shortcut control bar 633 , and the toolbar 632 may refer to the relevant descriptions of the search bar 611 , the shortcut control bar 613 , and the toolbar 612 in FIG. 9 above.
  • the display contents of the address search page interface 620 and the address search page interface 630 are generally the same, but the display forms are different.
  • the display positions of the shortcut control bar 623 and the shortcut control bar 633 are different.
  • the shortcut control bar 623 is displayed to the right of the one or more address lists, and the shortcut control bar 633 is displayed below the search bar 631 and above the one or more address lists.
  • the display form (display position, display size, etc.) of the toolbar 622 and the toolbar 632 may also be determined in other ways.
  • the address search page interface can be divided into two types: up-down layout and left-right layout.
  • the aspect ratio of the screen is greater than 21:9, and the width of the right shortcut bar (accounting for one third of the total width) is greater than 380dp
  • the left and right layout is adopted, such as screen 1; in other cases, the upper and lower layout is adopted, such as screen 2.
  • CarKit can calculate which layout to adopt.
  • the specific data required by the interface is obtained through the Session.Callback implementation method of the map application.
  • FIG. 11 exemplarily shows a navigation page interface 710 of a map application on the electronic device 100 .
  • the navigation page interface 710 may include: navigation information 711A to 711F, a navigation window 712 , a toolbar 713 , a control 714 , a real image 715 , and a position marker 716 .
  • navigation information 711A to 711F may include: navigation information 711A to 711F, a navigation window 712 , a toolbar 713 , a control 714 , a real image 715 , and a position marker 716 .
  • Navigation information may include driving direction to the next intersection 711F (eg, turn right), distance to the next intersection 711D (eg, 100 meters), road name 711E (eg, "Bell Road”) to reach the next intersection, destination of arrival
  • the distance to the destination 711A eg, "14.9 kilometers”
  • the time required to reach the destination 711B eg, "56 minutes”
  • the estimated time to reach the destination 711C eg, "arrival at 09:04”
  • the navigation window 712 may include the current speed of the electronic device 100 and the remaining distance to the destination (eg, "58 Km/h” and "8.1 kilometers remaining”).
  • Toolbar 713 includes one or more functional controls, providing functions such as making calls, playing music, and the like.
  • Control 714 is used to zoom the size of map 401 .
  • a live view of the current road in the map is displayed in the live view 715 .
  • the display content in the real image 715 is an image captured by a camera of the electronic device 100 .
  • the location marker 716 may be used to indicate the current location of the electronic device 100 on the map.
  • the electronic device 100 may also acquire screen display parameters of the electronic device 200, and then determine the location of each control or module through calculation.
  • FIGS. 12A-12B exemplarily show the display effect diagrams of the navigation page interface of the map application on screens of different sizes. Although the display forms of the navigation page interface are different, the data required by the navigation page interface are the same, and the same interface of the Session is called.
  • FIGS. 12A to 12B exemplarily show a navigation page interface of a map application on the electronic device 200 .
  • FIG. 10A exemplarily shows a navigation page interface 720 of a map application on the electronic device 200; the navigation page interface 720 may include navigation information 721A-721F, a navigation window 722, tools Column 723, Control 724, Reality 725.
  • the description of the navigation information 721A to 721F, the navigation window 722, the toolbar 723, the control 724, and the real image 725 can refer to the navigation information 711A to 711F, the navigation window 712, the toolbar 713, the control 714, and the real image 715 in FIG. 11. related description.
  • FIG. 10B exemplarily shows a navigation page interface 730 of a map application on the electronic device 200; the navigation page interface 730 may include navigation information 731A-731F, a navigation window 732, tools Column 733, Control 734, Reality 735.
  • the description of the navigation information 731A to 731F, the navigation window 732, the toolbar 733, the control 734, and the real image 735 may refer to the navigation information 721A to 721F, the navigation window 722, the toolbar 723, the control 724, and the real image 725 in FIG. 11 above. related description.
  • the display form (display position, display size, etc.) of the toolbar 723, the toolbar 733, and the toolbar 743 may also be determined in other ways.
  • the display contents of the navigation page interface 720 and the navigation page interface 730 are generally the same, but the display forms are different.
  • the navigation information 721A-721C is displayed below the real image 725, while for a wide screen (screen 1), the navigation information 721A-721C is hidden.
  • Embodiment 2 music application access.
  • CarmusicKit provides one or more of layout, container, and data transmission channel.
  • the specific data in the layout and container is passed in by the music application, and the map application and CarmusicKit use the data transmission channel for data interaction and forward or reverse. control.
  • the application manufacturer integrates CarmusicKit in the installation package of the music application.
  • the music application When the music application starts, it will actively call the method in the Session to provide data for the interface, such as calling the setMetaData method shown in Figure 13 to provide song data, the setPlayBackState method to provide playback status, Put music application custom interface style in setExtra, etc.
  • the music interface in CarmusicKit fills the interface with the data provided by the music application. After the user clicks the interface buttons, these click actions pass through the Controller and Session, and finally call the specific implementation of the music application Session.callback.
  • FIG. 13 exemplarily shows the interaction flow between the music application and carmusickit.
  • FIG. 13 exemplarily shows the Onplay, Onpause, Onsessionevent and other interfaces registered in the Session by the map application.
  • the Onplay interface is used to play music
  • the Onpause interface is used to pause playing music
  • the Onsessionevent interface is used to monitor session activity.
  • steps 302 to 304 describe the implementation process in which the user interface obtains data from the music application, and the music application returns the data through Session.callback.
  • CarmusicKit exposes the upper-layer client interface elements to the music application in the form of a data model, and the music application transmits the raw data required by CarmusicKit to CarmusicKit according to the standard data structure for drawing the upper-layer client interface.
  • the interface drawn in CarmusicKit is displayed on the display screen of the electronic device 200.
  • the electronic device 100 detects the click event, and CarmusicKit obtains the interface data required for the music playback interface from the music application, for example, through the play method in the Controller, This method will call the onplay interface to obtain the interface data of music playback from the map application.
  • the data obtained by CarmusicKit is loaded into the interface layout and container, and after the drawing is completed, it is completely presented on the display screen of the electronic device 200 .
  • steps 305 to 307 describe the implementation process of the map application actively updating/switching the current user interface.
  • Music applications can actively use the Controller provided by CarmusicKit to control the upper-level client interface. If the music application needs to actively initiate business processes such as play, pause, and update, it can call the open methods in CarmusicKit's Session to obtain the Controller, and then control the music business process.
  • FIG. 13 exemplarily shows the Onmetadatachanged, Onplaybackstatechanged, Onsessionevent and other interfaces registered in the controller by the music application.
  • Onmetadatachanged is used to change metadata
  • Onplaybackstatechanged is used to change the playback state
  • Onsessionevent is used to monitor session activity.
  • the following exemplarily shows the display form of the music application on the application interface of the electronic device 100 and the electronic device 200 .
  • the internal controls will adapt to the styles selected by different screens and different music applications.
  • the control automatically folds the icon text horizontally and vertically according to different numbers and the width of the screen; the displayed number of songs/playlists in the content page interface is realized by a custom algorithm, first set the width of each item to 160dp, and then It is fixed at 32dp. When the last item cannot be placed, the current number of columns is the number of columns of the item, and then the remaining items are equally divided into the remaining space at an interval of 32dp to obtain the width of each item.
  • FIGS. 14A to 14B exemplarily show the display forms of the content page interface of the music application on different screens.
  • FIG. 14A exemplarily shows the content page interface 810 of the music application on the electronic device 200;
  • the content page interface 810 may include: a toolbar 811, a control bar 812, and 8 A list of contents (my playlist and recommended playlist 1 to 7).
  • the toolbar 811 includes one or more functional controls, providing functions such as making calls and playing music;
  • the control bar 822 includes one or more controls, and each control includes two elements, namely an icon element and a text element. (eg "mine").
  • FIG. 14B exemplarily shows the content page interface 820 of the music application on the electronic device 200 .
  • the content page interface 820 may include: a toolbar 821, a control bar 822, and 6 content lists (My Playlist and Recommended Playlist 1-5).
  • a toolbar 821 For the description of the toolbar 821, the control bar 822, and the six content lists, reference may be made to the related descriptions of the toolbar 811, the control bar 812, and the eight content lists in FIG. 14A.
  • the display contents of the content page interface 810 and the content page interface 820 are generally the same, but the display forms are different.
  • the two elements (icon elements and text elements) of the controls in the control bar 812 are in a left-right layout, that is, the icon elements are displayed on the left side of the text elements; while for a narrow screen (screen 2) , the two elements (icon elements and text elements) of the controls in the control bar 822 are arranged up and down, that is, the icon elements are displayed above the text elements.
  • the display interface of screen 1 is larger than that of screen 2, the number of content lists in screen 1 is 8, and the number of content lists in screen 2 is 6.
  • the display form (display position, display size, etc.) of the toolbar 811 and the toolbar 821 may also be determined in other ways.
  • the list in the secondary details page adopts the listpattern control of uikit, which can have many different styles.
  • the specific style will automatically adopt different styles according to the application settings or different incoming data.
  • FIGS. 15A to 15C exemplarily show the display forms of the secondary details page interface of the music application on different screens.
  • FIG. 15A exemplarily shows the secondary details page interface 910 of the map application on the electronic device 200; the secondary details page interface 910 may include: a toolbar 911, song information area 912, and three song lists (song lists 913 to 915).
  • FIG. 15B exemplarily shows the secondary details page interface 920 of the map application on the electronic device 200; the secondary details page interface 920 may include: a toolbar 921, song information area 922, and three song lists (song lists 923 to 925).
  • FIG. 15C exemplarily shows the secondary details page interface 930 of the map application on the electronic device 200; the secondary details page interface 930 may include: a toolbar 931, song information area 932, and 4 song lists (song lists 933 to 936).
  • the display contents of the secondary details page interface 910, the secondary details page interface 920, and the secondary details page interface 930 are generally the same, but the display forms different.
  • the width of the song information area 922 and the three song lists is larger than that of the narrow screen (screen 2), the width of the song information area 922 and the three song lists (the song list 923 ⁇ 925).
  • the display form (display position, display size, etc.) of the toolbar 911, the toolbar 921, and the toolbar 931 may also be determined in other ways.
  • the playback page will automatically select different layouts according to the aspect ratio of different screens, so as to be compatible with different screens.
  • FIGS. 16A to 16C exemplarily show the display forms of the play page interface of the music application on different screens.
  • FIG. 16A exemplarily shows the play page interface 1010 of the map application on the electronic device 200; the play page interface 1010 may include: a toolbar 1011, a music picture 1012, a progress bar 1013, music information 1014, control bar 1015.
  • FIG. 16B exemplarily shows the play page interface 1020 of the map application on the electronic device 200; the play page interface 1020 may include: a toolbar 1021, a music picture 1022, a progress bar 1023, music information 1024, control bar 1025.
  • FIG. 16C exemplarily shows the play page interface 1030 of the map application on the electronic device 200; the play page interface 1030 may include: a toolbar 1031, a music picture 1032, a progress bar 1033, music information 1034, control bar 1035.
  • the display contents of the play page interface 1010, the play page interface 1020, and the play page interface 1030 are generally the same, but the display forms are different.
  • the music picture 1012 in screen 1 is displayed on the right side of the music information 1014 and the control bar 1015; the music picture 1022 in screen 2 is displayed on the right side of the music information 1024 and above the control bar 1025; the music picture 1032 in screen 2 is displayed Above the music information 1034 , the music information 1034 is displayed above the control bar 1035 .
  • the display form (display position, display size, etc.) of the toolbar 1011, the toolbar 1021, and the toolbar 1031 may also be determined in other ways.
  • the present application provides a chip system, which is applied to electronic equipment including a memory, a display screen and a sensor; the chip system includes: one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected by lines; The interface circuit is used to receive signals from the memory and send signals to the processor, where the signals include computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the methods of the foregoing embodiments.
  • the chip system may include one chip or multiple chips.
  • the present application does not limit parameters such as the type and quantity of chips.
  • the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on an electronic device, the electronic device causes the electronic device to execute the method for adding annotations in the foregoing embodiments.
  • the present application provides a computer program product that, when the computer program product is run on a computer, causes the computer to execute the method for adding annotations of the foregoing embodiments.
  • all or part of the functions may be implemented by software, hardware, or a combination of software and hardware.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium.
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Combustion & Propulsion (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本申请公开了一种应用接入方法及相关装置,该应用接入方法包括:第一电子设备运行目标应用,获取目标应用的第一显示内容;第一电子设备获取第二电子设备的屏幕显示参数;第一电子设备基于第一显示内容和第二电子设备的屏幕显示参数,确定显示数据,显示数据包括该第一显示内容的显示位置和显示大小;第一电子设备向第二电子设备发送显示数据,第二电子设备基于该显示数据,显示目标应用的应用界面。这种方法,第一电子设备将目标应用的显示内容根据第二电子设备的屏幕显示参数,适应性对显示内容进行布局,再投屏显示在第二电子设备的显示屏上,用户可以在第二电子设备上操作目标应用软件,完成了目标应用软件在第二电子设备上的接入。

Description

一种应用接入方法及相关装置
本申请要求于2020年9月30日提交中国专利局、申请号为202011062423.8、申请名称为“一种应用接入方法及相关装置”的中国专利申请的优先权,本申请要求于2020年9月10日提交中国专利局、申请号为202010949304.8、申请名称为“一种应用接入方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种应用接入方法及相关装置。
背景技术
当前,汽车屏幕多种多样,若应用厂商想要开发车载终端应用,应用厂商需要开发出繁多的UI来适配不同大小、不同分辨率、不同形状的车载终端屏幕。由于车载终端屏幕的种类繁多,车载终端应用的开发工作量很大。
目前,各家应用厂商独立开发车载终端应用,开发中的大部分时间耗在适配各种车载终端屏幕,做应用UI上的优化。由于各个应用厂商的UI设计风格各不相同,导致同一车载终端上的应用UI风格难以统一,这也很难给用户带来好的体验。并且,汽车上的应用开发难度较大,就降低了应用厂商开发车载终端应用的意愿,不利于车联网的生态建设。
发明内容
本申请提供了一种应用接入方法及相关装置,实现了目标应用软件在不同尺寸的显示屏幕上的适配和接入。这样,应用厂商无需关注UI即可开发出适用于不同尺寸的显示屏幕的应用软件,提高开发效率。
第一方面,本申请提供了一种应用接入方法,应用于第一电子设备和第二电子设备,第一电子设备和第二电子设备建立通信连接,该方法包括:第一电子设备运行目标应用,获取目标应用的第一显示内容;第一电子设备获取第一电子设备的屏幕显示参数;第一电子设备获取第二电子设备的屏幕显示参数;第一电子设备基于第一显示内容和第一电子设备的屏幕显示参数,确定出第一显示数据;第一电子设备基于第一显示内容和第二电子设备的屏幕显示参数,确定出第二显示数据;第一电子设备基于第一显示数据,显示第一界面;第一电子设备将第二显示数据发送给第二电子设备;第二电子设备基于第二显示数据在第二电子设备的显示屏上显示第二界面,第一界面中控件的布局和第二界面中控件的布局不同。
屏幕显示参数包括屏幕尺寸(长度、宽度)、分辨率等参数。本申请实施例为应用厂商提供了一种应用模板CarKit.aar,基于该应用模板,应用厂商无需关注UI,只需实现CarKit.aar中声明的接口,即可开发出适用于第二电子设备的应用软件,开发效率大大提高。应用厂商根据CarKit.aar对目标应用软件完成适配开发,并安装和运行在第一电子设备中,当第一电子设备和第二电子设备连接成功时,第一电子设备获取第二电子设备的显示屏的屏幕尺寸,基于第二电子设备的显示屏的屏幕尺寸和目标应用的显示内容,CarKit完成对显示内容的布局,第一电子设备绘制出适配于第二电子设备的屏幕尺寸的显示界面,将目标应用的显示内容投屏显示在第二电子设备的显示屏上,用户可以在第二电子设备上操作目标应用软件,完成了目标应用软件在第二电子设备上的接入。
第一电子设备基于第一电子设备的显示屏的屏幕尺寸和目标应用的显示内容,绘制出适配于第一电子设备的屏幕尺寸的显示界面,将目标应用的显示内容显示在第一电子设备的显 示屏上。也即是说,目标应用在在第一电子设备的显示屏上和第二电子设备的显示屏上分别显示一套用户界面,显示在第一电子设备上的用户界面由地图应用进行布局,显示在第二电子设备上的用户界面由CarKit进行布局。
结合第一方面,在一种可能的实现方式中,方法还包括:第二电子设备接收作用于第二界面的第一触控操作;第二电子设备向第一电子设备发送第一触控操作的触控参数;第一电子设备基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作触发的功能;第一电子设备基于第一触控操作触发的功能获取目标应用的第二显示内容;第一电子设备基于第二显示内容和第二电子设备的屏幕显示参数,确定出第三显示数据;第一电子设备将第三显示数据发送给第二电子设备;第二电子设备基于第三显示数据在第二电子设备的显示屏上显示第三界面。
这里提供了用户在第二电子设备上操作目标应用的方式。当用户在第二电子设备上对目标应用进行操作,第二电子设备向第一电子设备提供该操作的触控参数,触控参数可以指示包括触控坐标、触控方式(点击、滑动)或触控操作作用的控件、触控操作触发的事件(在某控件上的文本输入)等。第一电子设备中的Carkit基于触控参数调用相应的方法和接口,向地图应用获取显示内容,然后CarKit进行布局显示在第二电子设备的显示屏上。其中,在第二电子设备上操作目标应用,不影响第一电子设备的显示界面。
结合第一方面,在一种可能的实现方式中,方法还包括:第一电子设备接收作用于第一界面的第二触控操作;第一电子设备基于第二触控操作的触控参数,以及第一显示数据,确定第二触控操作触发的功能;第一电子设备基于第二触控操作触发的功能获取目标应用的第三显示内容;第一电子设备基于第三显示内容和第一电子设备的屏幕显示参数,确定出第四显示数据;第一电子设备基于第四显示数据,显示第四界面。
这里提供了用户在第一电子设备上操作目标应用的方式。当用户在第一电子设备上对目标应用进行操作,第一电子设备向目标应用提供该操作的触控参数(触控坐标、输入文本等),目标应用进行显示界面的布局,显示在第一电子设备的显示屏上。其中,在第一电子设备上操作目标应用,不影响第二电子设备的显示界面。
结合第一方面,在一种可能的实现方式中,屏幕显示参数包括屏幕长度和屏幕宽度,方法还包括:第一电子设备获取第三电子设备的屏幕显示参数,第三电子设备的屏幕长度大于第二电子设备的屏幕长度;第一电子设备基于第一显示内容和第三电子设备的屏幕显示参数,确定出第五显示数据;第一电子设备将第五显示数据发送给第三电子设备;第三电子设备基于第五显示数据在第三电子设备的显示屏上显示第五界面,第五界面中第一功能控件的显示长度大于第二界面中第一功能控件的显示长度。这里示例性的描述了一种布局规则,当第三电子设备的屏幕长度大于第二电子设备的屏幕长度,在第三电子设备上显示的某控件的显示长度可以大于该控件在第二电子设备上的显示长度。即控件的显示长度与显示屏幕的长度正相关。本申请实施例还提供了一些布局规则,例如拉伸、缩放、隐藏、均分、占比、折行、延伸等。
结合第一方面,在一种可能的实现方式中,当目标应用为地图应用,第一显示内容包括地图底图、一个或多个功能控件;一个或多个功能控件包括搜索框控件;第二显示内容包括历史搜索记录;第一电子设备基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作触发的功能,具体包括:第一电子设备基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作为针对于搜索框控件的用户操作。其中,第一电子设备中的Carkit确定第一触控操作为针对于搜索框控件的用户操作之后,Carkit基于触控参数调用相应的方 法和接口(例如searchaddress方法和onsearchaddress接口),向地图应用获取显示内容,地图应用基于searchaddress方法获取相应的数据,通过onsearchaddress接口提供给CarKit,然后CarKit进行布局显示在第二电子设备的显示屏上。
在一种可能的实现方式中,方法还包括:第二电子设备接收作用于第三界面的第三触控操作;第二电子设备向第一电子设备发送第三触控操作的触控参数;第一电子设备基于第三触控操作的触控参数,以及第三显示数据,确定第二触控操作为针对搜索框控件输入第一文本的用户操作;第一电子设备获取以第一文本为目标地点的第一地址信息;第一电子设备基于第一地址信息和第二电子设备的屏幕显示参数,确定出第六显示数据;第一电子设备将第六显示数据发送给第二电子设备;第二电子设备基于第六显示数据在第二电子设备的显示屏上显示第六界面。
在一种可能的实现方式中,第六显示数据包括第一地址信息和开始导航控件;方法还包括:第二电子设备接收作用于第六界面的第四触控操作;第二电子设备向第一电子设备发送第四触控操作的触控参数;第一电子设备基于第四触控操作的触控参数,以及第六显示数据,确定第四触控操作为针对于开始导航控件的用户操作;第一电子设备获取以第二电子设备的当前位置为出发地,以第一地址信息为目的地的导航信息;第一电子设备基于导航信息和第二电子设备的屏幕显示参数,确定出第七显示数据;第一电子设备将第七显示数据发送给第二电子设备;第二电子设备基于第七显示数据在第二电子设备的显示屏上显示第七界面。
在一种可能的实现方式中,导航信息包括以下至少一项:到下一个路口的距离、下一个路口的驾驶方向、下一个路口的道路名、到达目的地的剩余距离、驾驶时速、到达目的地所需时间、到达目的地剩余时间、实景图片、路况、或驾驶路线信息。上述实施例具体描述了在地图应用下,从主页界面到地址搜索页界面到导航界面的操作流程。
结合第一方面,在一种可能的实现方式中,当目标应用为音乐应用,第一显示内容包括一个或多个图片、一个或多个功能控件;一个或多个功能控件包括开始播放控件;第二显示内容包括播放进度指示信息;第一电子设备基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作触发的功能,具体包括:第一电子设备基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作为针对于开始播放控件的操作。
在一种可能的实现方式中,方法还包括:第一电子设备将第二显示内容对应的音频数据发送给第二电子设备;第二电子设备通过第二电子设备的扬声器播放音频数据。上述实施例具体描述了在音乐应用下,从主页界面到音乐播放页界面的操作流程。
结合第一方面,在一种可能的实现方式中,第二电子设备为车载终端。其中,第一电子设备可以为手机。
第二方面,本申请提供了一种应用接入系统,包括第一电子设备和第二电子设备,其中,第一电子设备,用于运行目标应用,获取目标应用的第一显示内容;第一电子设备,还用于获取第一电子设备的屏幕显示参数;第一电子设备,还用于获取第二电子设备的屏幕显示参数;第一电子设备,还用于基于第一显示内容和第一电子设备的屏幕显示参数,确定出第一显示数据;第一电子设备,还用于基于第一显示内容和第二电子设备的屏幕显示参数,确定出第二显示数据;第一电子设备,还用于基于第一显示数据,显示第一界面;第一电子设备,还用于将第二显示数据发送给第二电子设备;第二电子设备,用于基于第二显示数据在第二电子设备的显示屏上显示第二界面,第一界面中控件的布局和第二界面中控件的布局不同。
屏幕显示参数包括屏幕尺寸(长度、宽度)、分辨率等参数。本申请实施例为应用厂商提供了一种应用模板CarKit.aar,基于该应用模板,应用厂商无需关注UI,只需实现CarKit.aar 中声明的接口,即可开发出适用于第二电子设备的应用软件,开发效率大大提高。应用厂商根据CarKit.aar对目标应用软件完成适配开发,并安装和运行在第一电子设备中,当第一电子设备和第二电子设备连接成功时,第一电子设备获取第二电子设备的显示屏的屏幕尺寸,基于第二电子设备的显示屏的屏幕尺寸和目标应用的显示内容,CarKit完成对显示内容的布局,第一电子设备绘制出适配于第二电子设备的屏幕尺寸的显示界面,将目标应用的显示内容投屏显示在第二电子设备的显示屏上,用户可以在第二电子设备上操作目标应用软件,完成了目标应用软件在第二电子设备上的接入。
第一电子设备基于第一电子设备的显示屏的屏幕尺寸和目标应用的显示内容,绘制出适配于第一电子设备的屏幕尺寸的显示界面,将目标应用的显示内容显示在第一电子设备的显示屏上。也即是说,目标应用在在第一电子设备的显示屏上和第二电子设备的显示屏上分别显示一套用户界面,显示在第一电子设备上的用户界面由地图应用进行布局,显示在第二电子设备上的用户界面由CarKit进行布局。
结合第二方面,在一种可能的实现方式中,第二设备还用于:接收作用于第二界面的第一触控操作;第二电子设备,还用于向第一电子设备发送第一触控操作的触控参数;第一电子设备,还用于基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作触发的功能;第一电子设备,还用于基于第一触控操作触发的功能获取目标应用的第二显示内容;第一电子设备,还用于基于第二显示内容和第二电子设备的屏幕显示参数,确定出第三显示数据;第一电子设备,还用于将第三显示数据发送给第二电子设备;第二电子设备,还用于基于第三显示数据在第二电子设备的显示屏上显示第三界面。
这里提供了用户在第二电子设备上操作目标应用的方式。当用户在第二电子设备上对目标应用进行操作,第二电子设备向第一电子设备提供该操作的触控参数,触控参数可以指示包括触控坐标、触控方式(点击、滑动)或触控操作作用的控件、触控操作触发的事件(在某控件上的文本输入)等。第一电子设备中的Carkit基于触控参数调用相应的方法和接口,向地图应用获取显示内容,然后CarKit进行布局显示在第二电子设备的显示屏上。其中,在第二电子设备上操作目标应用,不影响第一电子设备的显示界面。
结合第二方面,在一种可能的实现方式中,第一电子设备,还用于接收作用于第一界面的第二触控操作;第一电子设备,还用于基于第二触控操作的触控参数,以及第一显示数据,确定第二触控操作触发的功能;第一电子设备,还用于基于第二触控操作触发的功能获取目标应用的第三显示内容;第一电子设备,还用于基于第三显示内容和第一电子设备的屏幕显示参数,确定出第四显示数据;第一电子设备,还用于基于第四显示数据,显示第四界面。
这里提供了用户在第一电子设备上操作目标应用的方式。当用户在第一电子设备上对目标应用进行操作,第一电子设备向目标应用提供该操作的触控参数(触控坐标、输入文本等),目标应用进行显示界面的布局,显示在第一电子设备的显示屏上。其中,在第一电子设备上操作目标应用,不影响第二电子设备的显示界面。
结合第二方面,在一种可能的实现方式中,系统还包括第三电子设备;屏幕显示参数包括屏幕长度和屏幕宽度;第一电子设备,还用于获取第三电子设备的屏幕显示参数,第三电子设备的屏幕长度大于第二电子设备的屏幕长度;第一电子设备,还用于基于第一显示内容和第三电子设备的屏幕显示参数,确定出第五显示数据;第一电子设备,还用于将第五显示数据发送给第三电子设备;第三电子设备,用于基于第五显示数据在第三电子设备的显示屏上显示第五界面,第五界面中第一功能控件的显示长度大于第二界面中第一功能控件的显示长度。这里示例性的描述了一种布局规则,当第三电子设备的屏幕长度大于第二电子设备的 屏幕长度,在第三电子设备上显示的某控件的显示长度可以大于该控件在第二电子设备上的显示长度。即控件的显示长度与显示屏幕的长度正相关。本申请实施例还提供了一些布局规则,例如拉伸、缩放、隐藏、均分、占比、折行、延伸等。
结合第二方面,在一种可能的实现方式中,当目标应用为地图应用,第一显示内容包括地图底图、一个或多个功能控件;一个或多个功能控件包括搜索框控件;第二显示内容包括历史搜索记录;第一电子设备,还用于基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作为针对于搜索框控件的用户操作。其中,第一电子设备中的Carkit确定第一触控操作为针对于搜索框控件的用户操作之后,Carkit基于触控参数调用相应的方法和接口(例如searchaddress方法和onsearchaddress接口),向地图应用获取显示内容,地图应用基于searchaddress方法获取相应的数据,通过onsearchaddress接口提供给CarKit,然后CarKit进行布局显示在第二电子设备的显示屏上。
在一种可能的实现方式中,第二电子设备,还用于接收作用于第三界面的第三触控操作;第二电子设备,还用于向第一电子设备发送第三触控操作的触控参数;第一电子设备,还用于基于第三触控操作的触控参数,以及第三显示数据,确定第二触控操作为针对搜索框控件输入第一文本的用户操作;第一电子设备,还用于获取以第一文本为目标地点的第一地址信息;第一电子设备,还用于基于第一地址信息和第二电子设备的屏幕显示参数,确定出第六显示数据;第一电子设备,还用于将第六显示数据发送给第二电子设备;第二电子设备,还用于基于第六显示数据在第二电子设备的显示屏上显示第六界面。
在一种可能的实现方式中,第六显示数据包括第一地址信息和开始导航控件;第二电子设备,还用于接收作用于第六界面的第四触控操作;第二电子设备,还用于向第一电子设备发送第四触控操作的触控参数;第一电子设备,还用于基于第四触控操作的触控参数,以及第六显示数据,确定第四触控操作为针对于开始导航控件的用户操作;第一电子设备,还用于获取以第二电子设备的当前位置为出发地,以第一地址信息为目的地的导航信息;第一电子设备,还用于基于导航信息和第二电子设备的屏幕显示参数,确定出第七显示数据;第一电子设备,还用于将第七显示数据发送给第二电子设备;第二电子设备,还用于基于第七显示数据在第二电子设备的显示屏上显示第七界面。
在一种可能的实现方式中,导航信息包括以下至少一项:到下一个路口的距离、下一个路口的驾驶方向、下一个路口的道路名、到达目的地的剩余距离、驾驶时速、到达目的地所需时间、到达目的地剩余时间、实景图片、路况、或驾驶路线信息。上述实施例具体描述了在地图应用下,从主页界面到地址搜索页界面到导航界面的操作流程。
结合第二方面,在一种可能的实现方式中,当目标应用为音乐应用,第一显示内容包括一个或多个图片、一个或多个功能控件;一个或多个功能控件包括开始播放控件;第二显示内容包括播放进度指示信息;第一电子设备,还用于基于第一触控操作的触控参数,以及第二显示数据,确定第一触控操作为针对于开始播放控件的操作。
在一种可能的实现方式中,第一电子设备,还用于将第二显示内容对应的音频数据发送给第二电子设备;第二电子设备,还用于通过第二电子设备的扬声器播放音频数据。上述实施例具体描述了在音乐应用下,从主页界面到音乐播放页界面的操作流程。
结合第二方面,在一种可能的实现方式中,第二电子设备为车载终端。其中,第一电子设备可以为手机。
第三方面,本申请提供了一种电子设备,包括:一个或多个处理器、一个或多个存储器;该一个或多个存储分别与一个或多个处理器耦合;该一个或多个存储器用于存储计算机程序 代码,该计算机程序代码包括计算机指令;当该计算机指令在该处理器上运行时,使得该电子设备执行上述第一方面任一种可能的实现方式中第一电子设备或第二电子设备执行的应用接入方法。
第四方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得通信装置执行上述第一方面任一项可能的实现方式中的应用接入方法。
第五方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述第一方面任一项可能的实现方式中的应用接入方法。
附图说明
图1为本申请实施例提供的一种应用接入方法的系统示意图;
图2为本申请实施例提供的一种电子设备的结构示意图;
图3为本申请实施例提供的一种电子设备的软件架构图;
图4A为本申请实施例提供的一种应用接入方法的方法流程图;
图4B为本申请实施例提供的一种应用接入方法的原理流程图;
图5为本申请实施例提供的一组屏幕尺寸示意图;
图6A为本申请实施例提供的一种地图应用接入的原理流程图;
图6B为本申请实施例提供的一种地图应用接入的方法流程图;
图7为本申请实施例提供的另一组界面示意图;
图8A-图8D为本申请实施例提供的另一组界面示意图;
图9为本申请实施例提供的另一组界面示意图;
图10A-图10B为本申请实施例提供的另一组界面示意图;
图11为本申请实施例提供的另一组界面示意图;
图12A-图12B为本申请实施例提供的另一组界面示意图;
图13为本申请实施例提供的一种音乐应用接入的原理流程图;
图14A-图14B为本申请实施例提供的另一组界面示意图;
图15A-图15C为本申请实施例提供的另一组界面示意图;
图16A-图16C为本申请实施例提供的另一组界面示意图。
具体实施方式
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
如图1所示,图1示例性示出了本申请提供的一种系统10的架构示意图。该系统10可包括:电子设备100和电子设备200。其中,电子设备100与电子设备200可以通过蓝牙(blue tooth,BT),近场通信(near field communication,NFC),无线保真(wireless fidelity,WiFi),WiFi直连、ZigBee和账号共享等无线通信方式进行通信。
本申请实施例中的电子设备100和电子设备200可以是手机、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(Augmented reality,AR)\虚拟现实(virtual reality,VR)设备、车载设备、车载终端、手表、手环等具有触控屏(或显示屏)的电子设备,本申请实施例对该电子设备的具体类型不作特殊限制。
在一些实施例中,以电子设备100为手机,电子设备200为车载终端为例;电子设备200集成了HUAWEI HiCar SDK,HUAWEI HiCar SDK支持电子设备200接入到HUAWEI HiCar的生态连接。
图2示例性示出了电子设备100的结构示意图。
下面以电子设备100为例对实施例进行具体说明。应该理解的是,图2所示电子设备100仅是一个范例,并且电子设备100可以具有比图2中所示的更多的或者更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。
电子设备100可以包括:处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复 存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
终端100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。终端100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在终端100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在终端100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决 方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,终端100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。摄像头193用于捕获静态图像或视频。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。受话器170B,也称“听 筒”,用于将音频电信号转换成声音信号。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。耳机接口170D用于连接有线耳机。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。陀螺仪传感器180B可以用于确定电子设备100的运动姿态。磁传感器180D包括霍尔传感器。加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。环境光传感器180L用于感知环境光亮度。指纹传感器180H用于采集指纹。温度传感器180J用于检测温度。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器180K可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。
骨传导传感器180M可以获取振动信号。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。马达191可以产生振动提示。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口195用于连接SIM卡。
目前,汽车屏幕多种多样,若应用厂商想要开发车载终端应用,应用厂商需要开发出繁多的UI来适配不同大小、不同分辨率、不同形状的车载终端屏幕。由于车载终端屏幕的种类繁多,车载终端应用的开发工作量很大。
对于各家应用厂商来说,独立开发车载终端应用,开发中的大部分时间耗在适配各种车载终端屏幕,做应用UI上的优化。由于各个应用厂商的UI设计风格各不相同,导致同一车载终端上的应用UI风格难以统一,这也很难给用户带来好的体验。并且,汽车上的应用开发难度较大,就降低了应用厂商开发车载终端应用的意愿,不利于车联网的生态建设。
本申请实施例提供的一种应用接入方法为应用厂商提供了一种应用模板CarKit.aar,基于该应用模板,应用厂商无需关注UI,只需实现CarKit.aar中声明的接口,即可开发出适用于电子设备200的应用软件,开发效率大大提高。应用厂商根据CarKit.aar对目标应用完成适配开发,安装和运行在电子设备100中,当电子设备100和电子设备200连接成功,电子设备100获取电子设备200的显示屏的屏幕尺寸,基于电子设备200的显示屏的屏幕尺寸和目标应用的显示内容,电子设备100绘制出适配于该屏幕尺寸的显示界面,将目标应用的显示内容投屏显示在电子设备200的显示屏上,用户可以在电子设备200上操作目标应用,完成了目标应用在电子设备200上的接入。
电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。其中,Android系统仅为本申请实施例中电子设备100的一种系统示例,本申请还可以适用于其他类型的操作系统,比如IOS、windows、鸿蒙等,本申请对此不加以限制。下述仅将Android系统作为电子设备100的操作系统的示例。
图3示出了本申请实施例的电子设备100的软件结构框图。
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为三层,从上至下分别为应用程序层,应用程 序框架层,以及操作系统层。
应用程序层可以包括一系列应用程序包。
如图3所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,游戏,购物,出行,即时通信(如短信息)等应用程序。另外,应用程序包还可以包括:主屏幕(即桌面),负一屏,控制中心,通知中心等系统应用程序。
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。
如图3所示,应用程序框架层可以包括输入管理器,窗口管理器(window manager),内容提供器,视图系统,电话管理器,资源管理器,通知管理器,显示管理器,活动管理器(activity manager)等。为了便于说明,图3中,应用程序框架层以包括窗口管理器,活动管理器,内容提供器,视图系统,以及carkit模块为例进行示意。
活动管理器用于管理系统里正在运行的activities,包括进程(process)、应用程序、服务(service)、任务(task)信息等。通常来说,每运行一个应用程序,活动管理器对应启动一个任务栈,一个任务栈中包括一个或多个activity。举例来说,电子设备100运行一个应用程序,启动该应用程序的任务栈,此时一个activity(activity1)被激活,它显示在显示屏194的最前端,处于任务栈的最顶端(Activity栈顶),此时activity1处于可见并可和用户交互的激活状态(active/running);当电子设备100接收到某一用户操作,需要显示新的应用界面,一个新的activity(activity2)被放置在任务栈的最顶端。若activity2为非全屏显示的应用界面或者为透明的应用界面,即activity2没有覆盖activity1或者没有完全覆盖activity1,此时activity1为暂停状态(Paused),activity1依然与窗口管理器保持连接,保持所有的数据且在显示屏194上可见,但已经不能与用户进行交互。在电子设备100的系统内存不足的时候,activity1将被强行终止掉(killed);若activity2完全覆盖activity1,此时activity1为停止状态(Stopped),activity1保持所有的数据但在显示屏194上不可见,在电子设备100的系统内存不足的时候,停止状态的activity优先于暂停状态的activity被终止掉。需要说明的是,当应用程序被关闭时,该应用程序的任务栈中所有的activity也被终止了。
本申请实施例,电子设备100运行目标应用,该目标应用支持同时显示在两个电子设备上,用户可以在两个电子设备上操作同一个应用软件。其中,该目标应用对应两套activity实例,一套可以显示在电子设备100的显示屏194上,一套可以显示在电子设备200的显示屏上。这两套activity实例互不干扰,目标应用可以从电子设备100的Activity或者电子设备200的Activity中获取对应的Context,在不同的显示屏上使用对应的Context,以获取目标应用的加载和访问资源。
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。还可以用于控制窗口的外表、位置和提供用户去操作这些窗口程序的方法。本申请中,窗口管理器获取电子设备200的显示屏的屏幕尺寸,确定显示在电子设备200的显示屏上的窗口的大小和位置。
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。本申请中,内容提供器获取应用程序提供的显示内容,由视图系统绘制在电子设备100的显示屏上,和电子设备200的显示屏上。
carkit模块为应用程序层的应用程序提供相应的接口,通过carkit模块提供的接口实现电子设备200对应用程序的显示内容获取以及业务控制的功能。本申请实施例以地图应用和音乐应用为例,示例性的提供了carmapkit模块和carmusickit模块,其中,carmapkit模块为地图应用提供相应的接口,通过该接口实现地图应用与电子设备200的交互;例如电子设备100通过carmapkit模块提供的接口获取地图应用的显示内容,显示在电子设备200的显示屏上;又例如用户在电子设备200上操作该地图应用,电子设备100通过carmapkit模块提供的接口向地图应用发起相应业务的执行。同理,carmusickit模块为音乐应用提供相应的接口,通过该接口实现音乐应用与电子设备200的交互。
carkit模块还用于对获取的显示内容进行布局。carkit模块基于电子设备200的显示屏的屏幕显示参数,对获取到的显示内容(按钮、文本、图片等)进行例如拉伸、缩放、隐藏、均分、折行、延伸等方式的布局。
输入管理器用于接收如操作系统层上报的指令或请求。
显示管理器用于向操作系统层传输显示内容。
电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。
操作系统层提供了对硬件的管理功能,用于对应用程序使用电子设备100的各种资源(CPU、存储器、输入输出设备、显示屏、扬声器、麦克风等)进行管理和分配。例如,当某一应用程序需要运行时,操作系统将其调入内存中,为该应用程序分配内存空间进行运行以及数据存储。再如某应用程序需要显示应用界面时,操作系统调用显示设备(例如电子设备200),为该应用程序提供对该显示设备的控制服务等。本申请实施例中,电子设备100与电子设备200建立连接,电子设备100中的应用程序可以使用电子设备200的硬件资源。
下面结合上述图3,介绍电子设备100实现本申请的应用接入的方法的具体工作原理。
如图4A所示,图4A为本申请实施例一种应用接入的方法的流程示意图。
步骤S10:电子设备100和电子设备200建立连接。
电子设备100与电子设备200建立连接,可以通过蓝牙(blue tooth,BT),近场通信(near field communication,NFC),无线保真(wireless fidelity,WiFi),WiFi直连、ZigBee和账号共享等无线通信方式进行通信。本申请中,电子设备100可以称为第一电子设备,电子设备200可以称为第二电子设备。
其中,步骤S12的执行顺序可以是在步骤S10之前,也可以是在步骤S10之后。
步骤S11:电子设备100启动目标应用。
用户点击启动目标应用,目标应用可以是在电子设备100上触发启动,也可以是在电子设备200上触发启动。当用户在电子设备100上触发启动目标应用,电子设备100运行目标应用;当用户在电子设备200上触发启动目标应用,电子设备200向电子设备100发送消息,指示电子设备100运行目标应用。
步骤S12:carkit获取电子设备200的屏幕显示参数。
其中,步骤S12的执行顺序可以是在步骤S11之后,也可以是在步骤S10之后。电子设 备100的carkit模块获取电子设备200的屏幕显示参数。屏幕显示参数包括电子设备200的显示屏的实际屏幕显示的长度和宽度,即可视的屏幕尺寸。屏幕显示参数还可以包括电子设备200的显示屏的分辨率等参数。
步骤S13:carkit获取主页界面的显示内容。
Carkit向目标应用获取主页界面的显示内容,例如对于地图应用来说,主页界面的显示内容包括地图底图、搜索按钮或快捷地址按钮等等;对于音乐应用来说,主页界面的显示内容包括推荐歌曲、搜索按钮或播放按钮等等。本申请实施例中,主页界面的显示内容可以称为第一显示内容。
步骤S14:carkit根据该主页界面的显示内容和电子设备200的屏幕显示参数确定出第二显示数据。
第二显示数据为适配于电子设备200的显示屏的显示数据,该第二显示数据中的元素是基于获取的主页界面的显示内容得到的。
步骤S15:基于该第二显示数据,电子设备200投屏显示第二界面。
电子设备100向电子设备200投屏显示第二界面,电子设备200的显示屏显示第二界面,其中,第二界面全屏显示在电子设备200的显示屏上。用户可以通过电子设备200显示的应用界面使用目标应用。
本申请实施例中,电子设备100启动目标应用,电子设备100获取主页界面的显示内容,通过视图系统绘制界面,在电子设备100的显示屏上显示第一界面,即目标应用的主页界面。
由于电子设备100和电子设备200的屏幕尺寸不同,则电子设备100的显示界面和电子设备200的显示界面的布局方式也不同。
在一些实施例中,电子设备100后台运行目标应用,目标应用仍然可以通过电子设备200显示的应用界面正常使用。
步骤S16:电子设备200接收到针对于第二界面的用户操作。步骤S17:carkit监听到该用户操作。步骤S18:carkit获取该第二界面的二级界面的显示内容。
步骤S16~步骤S18描述了电子设备200向目标应用获取显示内容的执行方式。该用户操作用于进入到第二界面的二级界面,例如目标应用为地图应用,电子设备200显示的第二界面中包括快捷地址按钮,用户点击该快捷地址按钮,carkit监听到该用户操作,基于该用户操作向地图应用获取相应的显示内容。
步骤S19:carkit根据二级界面的显示内容和电子设备200的屏幕显示参数确定出第二显示数据。步骤S20:基于该第三显示数据,电子设备200投屏显示第三界面。
第三显示数据为适配于电子设备200的显示屏的显示数据,该第三显示数据中的元素是基于获取的二级界面的显示内容得到的。电子设备100向电子设备200投屏显示第三界面,电子设备200的显示屏显示第三界面。
在一些实施例中,目标应用若要控制自身的业务流程,可以主动对应用界面进行更新或切换。举例来说,目标应用在最上层监听屏幕事件,若目标应用长时间没有接收到用户操作,就更新当前应用界面。此时,目标应用向carkit发送指示信息并提供显示数据,指示carkit绘制新的显示界面,并投屏显示在电子设备200的显示屏上。CarKit与目标应用就按照这种控制与反向控制的逻辑,与用户完成交互。
本申请实施例中提及的activity是一个应用程序组件,用于实现电子设备100和用户的交互,一个activity提供了一个应用界面,电子设备100可以基于用户在应用界面中触发的事件作出响应。本申请中,电子设备100运行目标应用,电子设备100支持该目标应用同时显示 在电子设备100和电子设备200的显示屏上,便于用户可以同时在电子设备100上和电子设备200上操作同一个应用。由于电子设备100的显示屏和电子设备200的显示屏的屏幕尺寸不同,电子设备100启动两套activity实例,一套用于显示在电子设备100的显示屏上,一套用于投屏显示在电子设备200的显示屏上。
在本申请实施例中,目标应用需要将电子设备100上展示的Activity和电子设备200上展示的Activity进行隔离处理(包括用于跳转的Activity),即目标应用需要在手机上和车载终端上使用完全不同的两套Activity实例。这意味着目标应用内部将会有两套Context,电子设备100将两套Context分开进行管理,目标应用在不同的屏幕上使用对应的Context。
本申请实施例中,该目标应用为适配了应用模板CarKit的应用软件,基于该应用模板,应用厂商无需关注UI,只需实现CarKit.aar中声明的接口,就可以实现将电子设备100中的目标应用接入到电子设备200,且UI界面能够自适应电子设备200的屏幕。如图4B所示,Session、Controller、UI三者是CarKit应用模板的功能范围,本申请提供车载终端应用开发模板CarKit,CarKit中包括一个或多个定义好的Session接口以及可调用的方法/函数。
目标应用在电子设备100中集成该开发包,然后实现Session的接口。用户交互界面由Activity承载,界面布局随屏幕尺寸做相应的变化。界面需要的数据最终调用的是Session.Callback里面的接口,而该接口是由应用厂商(目标应用)实现。应用厂商若要变更数据或状态等,可以调用Session中的方法,获取到Controller,然后控制业务流程。用户若要变更数据或状态等,Activity会检测到由用户触发的用户操作,显示界面也会做相应的变化。具体步骤如下:
101、接口注册。
目标应用在Application工程中集成CarKit,在应用创建时完成Session.Callback中定义的接口,并向CarKit注册。例如图4B中示出的Session.Callback中的OnqueryData接口,用于查询目标应用中的信息或数据等。
在一些实施例中,步骤101为在目标应用安装的过程中执行的步骤,或者在第一次运行目标应用时执行的步骤。
102、调用方法获取数据;103、调用接口获取数据;104、回调。
具体的,步骤102~步骤104描述了用户交互界面向目标应用获取数据的实现过程。CarKit中绘制的应用界面在电子设备200的显示屏上显示,触发目标应用各类的回调,可以获取到应用界面所需数据,绘制应用界面。其中,回调指的是目标应用将某个方法或函数通过参数传递给CarKit,以供CarKit通过该方法或函数调用目标应用。
本申请中,CarKit监听到在用户交互界面发生的事件,基于该事件对应的方法(例如方法1)调用Session.callback中相应的接口(例如接口1),向目标应用获取需要的数据,目标应用基于该方法(方法1)查询数据,通过该接口(接口1)返回查询结果。
举例来说,当电子设备100启动目标应用,目标应用的主页界面对应的activity调用Controller中的queryData方法以调用OnqueryData接口,通过OnqueryData接口向目标应用获取主页界面的界面内容,目标应用基于queryData方法获取到主页界面的界面内容,通过OnqueryData接口发送给CarKit。又例如目标应用在运行过程中,目标应用的Activity监听到数据或状态变更等,例如监听到由用户在主页界面上触发的进入二级界面的用户操作,调用Controller中的该二级界面对应的方法以调用对应的接口,通过该对应的接口向目标应用获取二级界面的界面内容,目标应用基于该对应的方法获取到二级界面的界面内容,通过该对应的接口发送给CarKit。
105、目标应用调用方法接口提供数据;106、调用接口提供数据;107、更新相应的UI界面。
具体的,步骤105~步骤107描述了目标应用主动更新/切换当前用户交互界面的实现过程。目标应用若要控制目标应用的流程,可以通过Session调用Controller中的方法,以操作各类业务。CarKit与目标应用就按照这种控制与反向控制的逻辑,与用户完成交互。
举例来说,目标应用在最上层监听屏幕点击事件,可以通过调用CarMapKit提供的接口来做应用界面的更新或切换。如若屏幕长时间无点击动作,就更新当前应用界面。此时,目标应用调用图4B中示出的Session.Callback中的changedata方法,通过Controller中的onchangedata接口向CarKit提供需要更新的界面数据。
在一些实施例中,目标应用支持同时显示在电子设备100和电子设备200的屏幕上,便于用户可以同时在电子设备100上和电子设备200上操作同一个应用。当目标应用使用该能力时需要在目标应用的AndroidManifest文件中增加如下配置:
Figure PCTCN2021117075-appb-000001
在一些实施例中,当电子设备100与电子设备200建立连接后,用户通常会通过电子设备200对目标应用进行操作,电子设备100可能会进入熄屏/锁屏状态。此时,目标应用仍然可以通过电子设备200显示的应用界面正常使用。
可选的,为确保目标应用在锁屏状态下仍然可以通过电子设备200显示的应用界面正常使用,目标应用需要找到用于电子设备200屏幕展示的Activity,在onCreate()方法中增加如下代码:
Figure PCTCN2021117075-appb-000002
本申请实施例中,电子设备100和电子设备200建立连接的时机可以是在运行目标应用之前,也可以是在运行目标应用之后。其中,目标应用的应用类别可以包括:地图类应用、音乐类应用、新闻类应用、服务类应用(驾驶关怀、车服务)、娱乐类应用(视频、游戏)等。
图4B是一种通用画法,仅仅作为架构示意图,真正实施情况据实际应用而定。比如图4B中的方法名queryData,在地图应用中,这个方法名可能叫做queryAddress、queryPath等,而在音乐应用中,queryData可能就是querySongs等方法。
在一些实施例中,CarKit提供了目标应用的UI界面绘制和渲染的能力。电子设备100获取电子设备200的显示屏的屏幕显示参数,根据电子设备200的显示屏的屏幕显示参数以及获取的目标应用的界面数据,绘制出显示在电子设备200的显示屏的应用界面,投屏显示在电子设备200的显示屏上。
接下来以电子设备100为手机、电子设备200为车载终端,以及目标应用为地图类应用和音乐类应用为例,详细说明本申请提供的应用接入方法。
首先先示例性的说明车载终端的几种不同类型的屏幕。如图5所示,图5示例性的示出 了3中不同尺寸的车载终端屏幕,分别为长宽比为24:9的屏幕1、长宽比为21:9的屏幕2和长宽比为9:16的屏幕3。相对于屏幕1、屏幕2和屏幕3,本申请实施例也可称屏幕1为宽屏,屏幕2为窄屏,屏幕3为高屏。
实施例一,地图应用接入。
CarMapKit为地图应用提供了布局、容器、以及数据传输通道等功能中的一项或多项,布局与容器内的具体数据由地图应用传入,地图应用与CarMapKit采用数据传输通道进行数据交互并进行正向或反向的控制。
应用厂商在地图应用的安装包中集成CarMapKit,当手机启动地图应用时,地图应用启动两套activity实例,一套可以称为phoneactivity(手机上的activity),一套可以称为caractivity(车载终端上的activity)。Phoneactivity关联手机上的硬件资源,caractivity关联车载终端上的硬件资源。其中,CarMapKit与caractivity对应。CarMapKit将地图应用界面分为两层:地图图层,该图层由地图应用提供;交互图层,该图层由CarMapKit提供。地图应用需将上述两层图层融合在一个caractivity中,并投屏到车载终端的显示屏上显示。
其中,地图图层是地图应用提供的,用户点击底图或者在底图上滑动,这样的事件由地图应用监听。交互图层由CarMapKit提供,由CarMapKit监听到用户的点击事件,然后可以主动跳转到某个界面,或者通知地图应用让地图应用来主动跳转到某个界面。
通过上述图层分层设计,地图应用只需关注地图数据提供以及地图导航业务处理,无须关注例如车载终端屏幕分辨率适配、汽车旋钮摇杆适配等。同时,地图应用通过调用CarMapKit提供的接口可以完成对交互图层的数据传递和数据控制。
CarMapKit为了完成交互层界面的绘制和管理,提供了如下类供地图应用使用:
Callback类:CarMapKit使用地图应用提供的数据绘制上层交互层界面,需要地图应用注册Callback类供CarMapKit调用。
Controller类:CarMapKit地图应用有时候需要主动调用CarMapKit的业务能力,CarMapKit提供对应的Controller供地图应用调用。
NavigationSessionMgr类:该类用于管理地图应用注册的Callback和CarMapKit提供的Controller。
地图应用需要在自身应用的Application初始化时将CarMapKit提供的NavigationSession正确初始化并注册各种Callback接口,以回调数据。
如图6A所示,图6A示例性示出了地图应用和carmapkit的交互流程。
201、启动地图应用,注册接口。
用户点击启动地图应用,其中地图应用可以是在手机上触发启动,也可以是在车载终端上触发启动。当用户在手机上触发启动地图应用,手机运行地图应用;当用户在车载终端上触发启动地图应用,车载终端向手机发送消息,指示手机运行地图应用。
地图应用创建Application工程,引入CarMapKit.aar,然后实现CarMapKit中的Session.Callback接口,最后在Application的onCreate方法中将Session.Callback的具体实现注册到Session中。对于地图应用来说,无需关注应用界面,只需实现Session.Callback接口,提供数据。若地图应用要主动控制用户界面,则调用Session中的开放方法。
地图应用可以在Application的初始化中实现8个callback接口类,分别为:
IAddressCallback:地址相关的接口类,CarMapKit会通过该接口回调获取各种地址相关的数据,例如搜索地址,推荐地址等地址信息;
ICustomViewCallback:自定义view相关的接口类;
IHiCarLifeCallback:HiCar生命周期相关的接口类,通过该接口指示地图应用的hicar启动和退出,hicar为手机和车载终端的一种连接方式;
INavigationStateCallback:导航状态相关的接口类,CarMapKit会通过该接口查询路径信息;
IRouteCallback:路由选择相关的接口类;
ISettingCallback:设置相关的接口类,当进入设置状态后CarMapKit会通过该接口获取全量的设置信息;
IThemeChangeCallback:主题相关的接口类,当主题发生变更后会通过该接口通知地图应用,例如当前支持黑白两套主题;
IToolCallback:工具栏相关的接口类,CarMapKit会通过该回调查询地图上的工具栏显示需要的信息。
地图应用需要实现上述8个接口类并注册,否则CarMapKit会运行异常。例如,图6A中示例性示出了地图应用实现并在Session中注册的OnGetMapRootView、OnQueryToolButton、OnSearchAddress、OnQueryQuickAddressButton、OnQuerypath、OnStartNavigation等接口。其中,OnGetMapRootView属于地址相关的接口类,用于获取地图;OnQueryToolButton属于工具栏相关的接口类,用于获取地图上的工具栏需要显示的按钮/图标;OnSearchAddress属于地址相关的接口类,用于搜索地址;OnQueryQuickAddressButton属于地址相关的接口类,用于获取地图上需要显示的快捷地址的按钮;OnQuerypath属于地址相关的接口类,用于查询路径;OnStartNavigation属于导航状态相关的接口类,用于开启导航状态。
CarActivity的布局基本可以分为三层,最下面一层是地图底图view,中间层是CarMapKit的fragment,最上层是地图应用根据自身业务做的顶层UI。其中,地图底图在最下层;CarMapKit的UI层处于中间层,地图应用可以通过Fragment的动态加载方法加载CarMapKit的fragment,其中,CarMapKit全屏显示,fragment可以表示carActivity中的行为或用户界面部分。我们可以在一个carActivity中用多个Fragment组合来构建多窗格的UI,以及在多个carActivity中重复使用某个Fragment。fragment有自己的生命周期,能接受自己的输入,并且可以在Activity运行时添加或删除Fragment。
在一些实施例中,CarMapKit的整体框架中,CarMapKit的UI是以fragment的方式被carActivity动态加载的。其中本申请将CarActivity继承至FragmentActivity。CarActivity在使用CarMapKit时,需要将Activity的configuration初始化为car模式。可以在Activity的attachBaseContext方法中做configuration的初始化,由于CarMapKit获取主题的接口需要传入context,而在attachBaseContext方法中,Activity的context还未初始化完成,所以此方法中需要用到application的context。
这时,CarMapKit依赖的资源和接口就初始化好了,然后就可以在CarActivity中动态加载CarMapKit的fragment。
202、调用方法获取数据;203、调用接口获取数据;204、回调。
具体的,步骤202~步骤204描述了用户交互界面向地图应用获取数据,地图应用通过Session.callback返回数据的实现过程。CarMapKit将上层客户端界面元素以数据模型的方式对地图应用开放,地图应用按照标准的数据结构将CarMapKit需要的原始数据传递给CarMapKit,用于上层客户端界面的绘制。CarMapKit中绘制的界面在电子设备200的显示屏上显示,当用户点击了CarMapKit的界面,CarMapKit会调用地图应用注册的业务回调,从 而通知地图应用用户触发了什么事件。
举例来说,地图应用刚启动时,需要获取地图的底图和工具列表等信息,就会调用controller中的getMapRootView和queryToolButton方法,这两个方法就会调用Session.Callback中地图应用的ongetMapRootView接口和onqueryToolButton接口,从而从地图应用中获取到数据。地图首页获取到数据就加载到界面布局和容器中,绘制好了主页界面后就完整呈现到电子设备200的显示屏上。
地图的底图(地图图层)是地图应用提供的,用户点击底图或者在底图上滑动,这样的事件就由地图应用监听。地图上面一层界面(交互图层)由CarMapKit提供,由CarMapKit监听到用户的点击事件,然后可以主动跳转到某个界面,或者通知地图应用让地图应用来主动跳转到某个界面。
例如在地图应用的主页界面,交互图层可以包括搜索框、快捷地址控件等元素,用户在主页界面点击搜索框进入地址搜索页界面,CarMapKit监听到该点击事件,CarMapKit向地图应用获取地址搜索页界面所需的界面数据,例如通过Controller中searchaddress方法,输入参数为null,地图应用基于该参数查询地图应用的历史搜索记录。
用户在搜索框输入文本,CarMapKit监听到搜索框文本变化,CarMapKit向地图应用获取以该文本为关键词(目标地点)的地址信息,例如用户输入“华为A区”,CarMapKit通过Controller中searchaddress方法,输入参数为“华为A区”,地图应用基于该参数查询到“华为A区”的地址信息返回给CarMapKit。
在地址为“华为A区”的地址信息界面,交互图层可以包括开始导航控件等元素,用户点击开始导航控件,CarMapKit监听到该点击事件,CarMapKit向地图应用获取以电子设备200的当前位置为出发点,“华为A区”为目的地的导航信息,导航信息可以包括:到下一个路口的距离、下一个路口的驾驶方向、下一个路口的道路名、到达目的地的剩余距离、驾驶时速、到达目的地所需时间、到达目的地剩余时间、实景图片、路况、或驾驶路线信息等。
205、调用接口提供数据;206、调用方法提供数据;207、更新相应的UI界面。
具体的,步骤202~步骤204描述了地图应用更新/切换当前用户交互界面的实现过程。地图应用可以主动使用CarMapKit提供的Controller来控制上层客户端界面。地图应用如果需要主动发起导航、改变路线、发送通知等业务流程,可以调用CarMapKit的Session中开放的方法获取到Controller,然后控制地图的业务流程。
图6A中示例性示出了地图应用在controller中注册的OnStartNavigation、OnPathchanged、OnNotification等接口。其中,OnStartNavigation用于开启导航状态;OnPathchanged用于改变路径;OnNotification用于提供通知信息。
举例来说,地图应用刚启动时进入,需要获取地图的底图和工具列表等信息,就会调用controller中的getMapRootView和queryToolButton方法,这两个方法就会调用Session.Callback中地图应用的ongetMapRootView接口和onqueryToolButton接口,从而从地图应用中获取到数据。地图首页获取到数据就加载到界面布局和容器中,绘制好了主页界面后就完整呈现到电子设备200的显示屏上。
在一些实施例中,在地图业务中存在很多的地址元素,CarMapKit提供三种地址信息元素封装类供地图应用使用,下面我们依次介绍三种地址元素封装类及其使用范围:
基础地址元素(AddressInfo):最基础的地址元素,主要用于地点选择时使用以及推荐地址信息显示。该类型地址具备以下信息:地址ID:全局唯一的地址标识符。地址名称:地址的名称信息。地址附加信息:用于显示地址的附加信息,例如地址的缩略介绍,到达该地址的 时间和距离等信息。
带图标的地址元素(IconAddress):继承于AddressInfo,主要用于搜索页面的搜索地址的历史信息或者搜索出来的地址信息的展示。相比于AddressInfo增加了一个属性:地址图标信息:用于搜索页界面的地址元素的图标显示。
地图选点地址:继承于AddressInfo,主要作用于信息点(Point of Information,POI)地图显示出选中地点的详细信息,相比于AddressInfo增加了两个属性:第三优先级副文本:用于展示该地点的第三优先级副文本信息。点击第三优先级副文本后的业务回调:CarMapKit支持第三优先级副文本可被点击,如果地图应用支持点击则需要设置对应的点击回调。
举例来说,CarMapKit提供IAddressTransportControl供地图应用使用,通过这个类,地图应用在导航闲置状态时可以主动推荐一个地址信息给用户,也可以在导航闲置状态时,用户点击地图选点时将用户选中的地址详情信息展示给用户。如图6B所示,图6B中示例性示出了搜索地址信息的业务交互流程,具体的,
步骤S30:电子设备200的显示屏上显示地图应用的主页界面,该主页界面包括搜索框控件。
主页界面包括两层:地图图层(包括地图的底图)和交互图层(包括一个或多个控件)。其中地图的底图是地图应用提供的,用户点击底图或者在底图上滑动,这样的事件就由地图应用监听。交互图层由CarMapKit提供,由CarMapKit监听到用户的点击事件,然后可以主动跳转到某个界面,或者通知地图应用让地图应用来主动跳转到某个界面。
在本申请实施例中,目标应用为地图应用,电子设备200的显示屏上显示地图应用的主页界面可以称为第二界面。
步骤S31:carmapkit监听到针对搜索框控件的点击事件。
当用户在电子设备200的显示屏上点击主页界面的搜索框控件,carmapkit监听到针对搜索框控件的点击事件(第一触控操作)。
步骤S32:通过session.callback的onsearchaddress方法查询地图应用的历史搜索记录,入参address为null。
当carmapkit监听到针对搜索框控件的点击事件,需要跳转到地址搜索页界面。CarMapKit向地图应用获取地址搜索页界面所需的界面数据,通过调用controller的searchaddress方法,调用session.callback的onsearchaddress接口调用地图应用的历史搜索记录,入参address为null。
步骤S33:地图应用返回查询结果。
地图应用基于searchaddress方法,以参数为null进行查询,通过session.callback的onsearchaddress接口返回查询结果,该查询结果为地图应用的历史搜索记录。本申请中,该查询结果也可称为第二显示内容。
步骤S34:carmapkit布局地图应用的地址搜索页界面。carmapkit基于该查询结果和车载终端的屏幕显示参数,布局地图应用的地址搜索页界面,确定出第三显示数据。
步骤S35:电子设备200的显示屏上显示地址搜索页界面。本申请实施例中,电子设备200基于第三显示数据,在显示屏上显示地址搜索页界面,该地址搜索页界面可以称为第三界面。
步骤S36:监听到针对搜索框控件的输入事件,输入的文本为第一文本。
当用户在地址搜索页界面的搜索框控件中输入文本,carmapkit监听到针对搜索框控件的输入事件(第二触控操作),并识别出输入的文本为第一文本。
步骤S37:通过Session.callback的onsearchaddress方法查询以第一文本为目标地址的地址信息,入参address为第一文本。
当carmapkit监听到针对搜索框控件的输入事件,需要跳转到地址信息页界面。CarMapKit向地图应用获取地址信息页界面所需的界面数据,通过调用controller的searchaddress方法,调用session.callback的onsearchaddress接口调用地图应用的历史搜索记录,入参address为用户输入的第一文本,或者能够指示该第一文本的参数。
步骤S38:地图应用返回查询结果。
地图应用基于searchaddress方法,以参数为第一文本进行查询,通过session.callback的onsearchaddress接口返回查询结果,该查询结果为地图应用以第一文本为第一目标地址的地址信息。
步骤S39:carmapkit布局地图应用的地址信息页界面。carmapkit基于该查询结果和车载终端的屏幕显示参数,布局地图应用的地址信息页界面,确定出第六显示数据。
步骤S40:电子设备200的显示屏上显示地址信息页界面。本申请实施例中,电子设备200基于第六显示数据,在显示屏上显示地址信息页界面,该地址信息页界面可以称为第六界面。
步骤S41:监听到针对地址信息页界面的POI选点事件。
当用户在地址信息页界面中的地图底图上选择目标点,地图应用监听到针对地图底图的选点事件。
步骤S42:通过addresstransportcontrol的showselectaddress接口发送选中地址的地址信息。
地图应用识别出该选点事件的目标点,通过addresstransportcontrol的showselectaddress接口发送用户选中的目标点的详细地址信息。carmapkit布局该目标点的地址信息页界面,电子设备200的显示屏上显示该目标点的地址信息页界面。本申请实施例中,电子设备200的显示屏上显示该目标点的地址信息页界面可以称为第六界面。当用户在该第六界面触发开始导航控件时,carmapkit向地图应用获取第七显示数据,基于第七显示数据显示导航界面(第七界面)。
在一些实施例中,地图应用在最上层监听屏幕点击事件(可以为其他业务逻辑),可以通过调用CarMapKit提供的接口来做界面上的信息显隐。例如在行车模式下,若车载终端的屏幕预设时间内没有接收到点击动作,就将工具栏隐藏,有点击事件时再显示工具栏。
CarMapKit将地图业务分为以下六种业务状态,分别为:搜索状态(SEARCH_STATE):用于为用户提供地址搜索和快捷地址搜索的能力;导航闲置状态(NAVIGATION_IDLE_STATE):用于未发起导航任务时地图主页面的展示;地址选择状态(ADDRESS_SELECT_STATE):用于展示一系列地址供用户选择;导航路径选择状态(ROUTE_SELECT_STATE):用于展示导航去用户选择的目的地可选路径;导航进行中状态(NAVIGATION_ONGOING_STATE):用于展示当前用户导航的实时信息,包含诱导卡片以及各种自定义View;设置中状态(NAVIGATION_SETTING_STATE):用于向用户展示地图应用支持的设置清单。
在一些实施例中,CarMapKit要求地图应用必须实现INavigationStateCallback接口并将这个业务回调注册到NavigationCallback中。通过这个回调,CarMapKit可以通知地图应用的业务状态发生了变化。
在一些实施例中,CarMapKit提供了地图应用界面绘制和渲染的能力。CarMapKit需要的数据会通过上面注册的Callback类向地图应用请求,地图应用也可以通过Controller类控制 CarMapKit的业务流程。
在一些实施例中,CarMapKit除了提供地图应用界面渲染的能力,还可以接收并识别语音指令。当用户说出地图界面上的文字元素,就可以触发相应的按钮。比如说,地图首页有搜索按钮,当用户唤醒语音后说“搜索”,那么地图的搜索按钮就相当于被点击,然后自动进入地址搜索页面了。可选的,地图应用需要通过监听Activity的onKeyDown方法,然后将这个事件传给CarMapKit来处理。其中,onKeyDown方法可以理解为一种捕捉手机键盘被按下的事件。
下面示例性示出了地图应用在电子设备100和电子设备200的应用界面上的显示形式。为满足应用界面在不同的屏幕尺寸和比例的屏幕能正确的显示,界面的布局方式需要支持自适应的能力。布局适配方法主要用于同一应用界面在不同屏幕尺寸下的自适应布局能力,包括拉伸、缩放、隐藏、均分、占比、折行、延伸等。其中,拉伸指的是;缩放指的是界面内元素根据显示界面的横竖比例关系等比缩放;隐藏指的是当界面内元素横向布局,且元素间的距离是固定时,可显示的元素数量可以随着显示宽度的改变而改变;均分指的是界面内的元素根据个数均分各个元素之间的间距;占比指的是界面内的元素失踪占据显示界面中的一定比例;折行指的是两个元素之间的位置关系,根据两个元素的宽度选择这两个元素是左右布局还是上下布局;延伸指的是界面内元素根据实际情况显示元素个数,未显示完整的部分可通过滚动显示更多。可以理解的,上述布局适配方法只是示例性的列举,本申请对应用界面的布局适配方法不作限制。
下面以地图应用的主页界面、地址搜索页界面和导航页界面示例性的分别说明在不同屏幕上的显示形式。
1、主页界面
如图7所示,图7示例性的示出了地图应用在电子设备100上的主页界面410。主页界面410可包括地图401,状态栏402,地址栏403,控件404~控件406,工具栏407。其中,
状态栏402可包括:移动通信信号(又可称为蜂窝信号)的一个或多个信号强度指示符402A、无线高保真(wireless fidelity,Wi-Fi)信号的一个或多个信号强度指示符402B,电池状态指示符402C、时间指示符402D。
地址栏403包括搜索框,以及两个快捷地址(回家的地址和去公司的地址)。搜索框可以用于接收用户输入的目的地名称;快捷地址“回家”关联了一个用户预设的地址,当电子设备100接收到针对“回家”的用户操作,电子设备100提供对应的地址信息;快捷地址“去公司”关联了一个用户预设的地址,当电子设备100接收到针对“去公司”的用户操作,电子设备100提供对应的地址信息。
控件404提供了语音包的选择功能。控件405用于获取电子设备100当前在地图534上的位置。控件406用于对地图401的大小进行缩放。
工具栏407包括一个或多个功能控件,提供了例如打电话、播放音乐等功能。
本申请实施例中,电子设备100还可以获取到电子设备200的屏幕显示参数,然后通过计算确定各个控件或模块所在位置。图8A~图8C示例性示出了地图应用的主页界面在不同尺寸的屏幕上的展示效果图。虽然主页界面的显示形式不一样,但是主页界面所需数据都是相同的,调用的也是Session的同一个接口。
如图8A~图8C所示,图8A~图8C示例性示出了地图应用在电子设备200上的主页界面。当电子设备200的显示屏为屏幕1时,图8A示例性的示出了地图应用在电子设备200上的 主页界面510;主页界面510可包括地图501,地址栏511,控件513~控件515,工具栏512。其中,地图501、地址栏511、控件513~控件515、工具栏512的描述可以参考上述图7中地图401、地址栏403、控件404~控件406、工具栏407的相关描述。
可以看出,电子设备100的主页界面410和电子设备200的主页界面510的显示内容大体相同,但显示形式不同。例如工具栏512显示在地图501的左方,工具栏407显示在地图401的下方。
当电子设备200的显示屏为屏幕2时,图8B示例性的示出了地图应用在电子设备200上的主页界面520;主页界面520可包括地图502,地址栏521,控件523~控件525,工具栏522。其中,地图502、地址栏521、控件523~控件525、工具栏522的描述可以参考上述图7中地图401、地址栏403、控件404~控件406、工具栏407的相关描述。
当电子设备200的显示屏为屏幕3时,图8C示例性的示出了地图应用在电子设备200上的主页界面530;主页界面530可包括地图503,地址栏531,控件533~控件535,工具栏532。其中,地图503、地址栏531、控件533~控件535、工具栏532的描述可以参考上述图7中地图401、地址栏403、控件404~控件406、工具栏407的相关描述。
综上可以看出,对于不同的屏幕(屏幕1、屏幕2、屏幕3)来说,主页界面510、主页界面520、主页界面530的显示内容大体相同,但显示形式不同。例如对于宽屏(屏幕1)和窄屏(屏幕2)来说,地址栏511和地址栏521的显示宽度不同。在一些实施例中,地址栏的显示宽度与屏幕的宽度相关或成比例。又例如对于宽屏(屏幕1)和高屏(屏幕3)来说,工具栏512的显示位置不同。在一些实施例中,工具栏512显示在地图401的左方,工具栏532显示在地图503的下方。在一些实施例中,工具栏512、工具栏522、工具栏532的显示形式(显示位置、显示大小等)还可以通过其他方式确定。
在一些实施例中,主页界面的样式规定如下,将显示屏以黄金分割比分割,若有控件或模块显示在显示屏的左边,则左边的控件或模块的宽度不超过分割后的左边区域,可选的,左边的控件或模块的宽度根据屏幕实际宽度而变化。如图8D所示,将显示屏以黄金分割比(0.618:1)分为左右两部分区域,显示在左边区域的控件不能超过左边区域。可选的,右边同理,此处不再赘述。
2、地址搜索页界面
如图9所示,图9示例性的示出了地图应用在电子设备100上的地址搜索页界面610。地址搜索页界面610可包括:搜索栏611、快捷控件栏613、工具栏612,以及一个或多个地址列表。其中,
搜索栏611可以接收用户在搜索栏611中输入的目的地名称,并接收到用户针对搜索控件的输入操作。
快捷控件栏613提供了一个或多个快捷控件,每一个快捷控件对应了一个或多个地址,例如可以对应用户收藏的地址、指示去停车场的地址、指示去加油站的地址等等。
工具栏612包括一个或多个功能控件,提供了例如打电话、播放音乐等功能。
本申请实施例中,电子设备100还可以获取到电子设备200的屏幕显示参数,然后通过计算确定各个控件或模块所在位置。图10A~图10B示例性示出了地图应用的地址搜索页界面在不同尺寸的屏幕上的展示效果图。虽然地址搜索页界面的显示形式不一样,但是地址搜索页界面所需数据都是相同的,调用的也是Session的同一个接口。
如图10A~图10B所示,图10A~图10B示例性示出了地图应用在电子设备200上的地址搜索页界面。当电子设备200的显示屏为屏幕1时,图10A示例性的示出了地图应用在电子 设备200上的地址搜索页界面620;地址搜索页界面620可包括搜索栏621、快捷控件栏623、工具栏622,以及一个或多个地址列表。其中,搜索栏621、快捷控件栏623、工具栏622的描述可以参考上述图9中搜索栏611、快捷控件栏613、工具栏612的相关描述。
当电子设备200的显示屏为屏幕2时,图10B示例性的示出了地图应用在电子设备200上的地址搜索页界面630;地址搜索页界面630可包括搜索栏631、快捷控件栏633、工具栏632,以及一个或多个地址列表。其中,搜索栏631、快捷控件栏633、工具栏632的描述可以参考上述图9中搜索栏611、快捷控件栏613、工具栏612的相关描述。
综上可以看出,对于不同的屏幕(屏幕1、屏幕2)来说,地址搜索页界面620、地址搜索页界面630的显示内容大体相同,但显示形式不同。例如对于宽屏(屏幕1)和窄屏(屏幕2)来说,快捷控件栏623和快捷控件栏633的显示位置不同。在一些实施例中,快捷控件栏623显示在一个或多个地址列表的右方,快捷控件栏633显示在搜索栏631的下方、一个或多个地址列表的上方。在一些实施例中,工具栏622、工具栏632的显示形式(显示位置、显示大小等)还可以通过其他方式确定。
在一些实施例中,可以将地址搜索页界面分为上下布局和左右布局两种。当屏幕宽高比例大于21:9,并且右边快捷栏宽度(占总宽度三分之一)大于380dp时,采用左右布局,例如屏幕1;其他情况采用上下布局,例如屏幕2。根据这一规则,当用户跳转到这个界面时,CarKit就可以计算出采用何种布局。界面所需的具体数据通过地图应用的Session.Callback实现方法中获取。
3、导航页界面
如图11所示,图11示例性的示出了地图应用在电子设备100上的导航页界面710。导航页界面710可包括:导航信息711A~711F、导航窗口712、工具栏713、控件714、实景图715、位置标记716。其中,
导航信息可以包括到下一个路口驾驶方向711F(例如,右转)、下一个路口的距离711D(例如,100米)、下一个路口到达的道路名711E(例如,“贝尔路”)、到达目的地的距离711A(例如,“14.9公里”)、到达目的地所需时间711B(例如,“56分钟”)以及到达目的地的预计时刻711C(例如,“09:04到达”)。导航窗口712可以包括有电子设备100的当前速度和到达目的地的剩余距离(例如,“58Km/h”和“剩余8.1公里”)。
工具栏713包括一个或多个功能控件,提供了例如打电话、播放音乐等功能。
控件714用于对地图401的大小进行缩放。
实景图715中显示了地图中当前道路的实景图。可选的,实景图715中的显示内容为电子设备100的摄像头采集的图像。
位置标记716可用于指示电子设备100当前在地图中的位置。
本申请实施例中,电子设备100还可以获取到电子设备200的屏幕显示参数,然后通过计算确定各个控件或模块所在位置。图12A~图12B示例性示出了地图应用的导航页界面在不同尺寸的屏幕上的展示效果图。虽然导航页界面的显示形式不一样,但是导航页界面所需数据都是相同的,调用的也是Session的同一个接口。
如图12A~图12B所示,图12A~图12B示例性示出了地图应用在电子设备200上的导航页界面。当电子设备200的显示屏为屏幕2时,图10A示例性的示出了地图应用在电子设备200上的导航页界面720;导航页界面720可包括导航信息721A~721F、导航窗口722、工具栏723、控件724、实景图725。其中,导航信息721A~721F、导航窗口722、工具栏723、控件724、实景图725的描述可以参考上述图11中导航信息711A~711F、导航窗口712、工 具栏713、控件714、实景图715的相关描述。
当电子设备200的显示屏为屏幕1时,图10B示例性的示出了地图应用在电子设备200上的导航页界面730;导航页界面730可包括导航信息731A~731F、导航窗口732、工具栏733、控件734、实景图735。其中,导航信息731A~731F、导航窗口732、工具栏733、控件734、实景图735的描述可以参考上述图11中导航信息721A~721F、导航窗口722、工具栏723、控件724、实景图725的相关描述。在一些实施例中,工具栏723、工具栏733、工具栏743的显示形式(显示位置、显示大小等)还可以通过其他方式确定。
综上可以看出,对于不同的屏幕(屏幕1、屏幕2)来说,导航页界面720、导航页界面730的显示内容大体相同,但显示形式不同。例如对于窄屏(屏幕2)来说,导航信息721A~721C显示在实景图725的下方,而对于宽屏(屏幕1)来说,导航信息721A~721C被隐藏。
本申请实施例中,对于以上三个界面,当屏幕过小时,如果控件大小不变,可能会显示异常,故由一个总体规则来保证此种效果。可选的,设定一个最小宽度和最小高度,当屏幕的宽高低于此值时,界面包括其内的控件进行整体缩小,这样可以保证兼用所有的屏幕。
实施例二,音乐应用接入。
CarmusicKit提供了布局、容器、以及数据传输通道中的一项或多项,布局与容器内的具体数据由音乐应用传入,地图应用与CarmusicKit采用数据传输通道进行数据交互并进行正向或反向的控制。
应用厂商在音乐应用的安装包中集成CarmusicKit,当音乐Application启动后,会主动调用Session中的方法为界面提供数据,例如调用图13中示出的setMetaData方法提供歌曲数据、setPlayBackState方法提供播放状态、setExtra中放入音乐应用自定义的界面样式等等。CarmusicKit中的音乐界面通过音乐应用提供的数据填充界面,用户点击界面按钮后,这些点击动作通过经过Controller、Session,最终调用到音乐应用Session.callback的具体实现。例如,用户在界面点击了播放按钮,后台会发送play等指令,这样音乐应用的onPlay监听接口就会收到play事件,将播放状态刷新,然后再通过setMetaData方法将新数据提供给CarmusicKit的界面,界面也会进行相应的刷新。
如图13所示,图13示例性示出了音乐应用和carmusickit的交互流程。
301、启动音乐应用,注册接口。
图13中示例性示出了地图应用在Session中注册的Onplay、Onpause、Onsessionevent等接口。其中,Onplay接口用于播放音乐;Onpause接口用于暂停播放音乐;Onsessionevent接口用于监听会话活动情况。
302、调用方法获取数据;303、调用接口获取数据;304、回调。
具体的,步骤302~步骤304描述了用户交互界面向音乐应用获取数据,音乐应用通过Session.callback返回数据的实现过程。CarmusicKit将上层客户端界面元素以数据模型的方式对音乐应用开放,音乐应用按照标准的数据结构将CarmusicKit需要的原始数据传递给CarmusicKit,用于上层客户端界面的绘制。CarmusicKit中绘制的界面在电子设备200的显示屏上显示,当用户点击了CarmusicKit的界面,CarmusicKit会调用音乐应用注册的业务回调,从而通知音乐应用用户触发了什么事件。
举例来说,音乐应用在运行过程中,用户在主页界面点击音乐播放按钮,电子设备100检测到该点击事件,CarmusicKit向音乐应用获取音乐播放界面所需的界面数据,例如通过Controller中play方法,这个方法就会调用onplay接口向地图应用获取到音乐播放的界面数 据。CarmusicKit获取到数据就加载到界面布局和容器中,绘制好了后就完整呈现到电子设备200的显示屏上。
305、调用接口提供数据;306、调用方法提供数据;307、更新相应的UI界面。
具体的,步骤305~步骤307描述了地图应用主动更新/切换当前用户交互界面的实现过程。音乐应用可以主动使用CarmusicKit提供的Controller来控制上层客户端界面。音乐应用如果需要主动发起播放、暂停、更新等业务流程,可以调用CarmusicKit的Session中开放的方法获取到Controller,然后控制音乐的业务流程。
图13中示例性示出了音乐应用在controller中注册的Onmetadatachanged、Onplaybackstatechanged、Onsessionevent等接口。其中,Onmetadatachanged用于更改元数据;Onplaybackstatechanged用于改变播放状态;Onsessionevent用于监听会话活动情况。
可以理解的,CarmusicKit的实现流程的原理可以参考上述实施例一中CarmapKit的实现原理。
下面示例性示出了音乐应用在电子设备100和电子设备200的应用界面上的显示形式。
1、内容页界面
内容页界面中,内部控件会随着不同的屏幕,不同的音乐应用选择的样式进行自适应变化。例如控件根据不同的数目以及屏幕的宽度自动进行图标文字的横竖折行;内容页界面中歌曲/歌单的显示个数由自定义算法实现,先设定每个项目的宽度为160dp,然后间隔固定为32dp,当最后一个项目放不下时,当前列数即为项目的列数,然后其余项目以间隔32dp均分剩余空间,即可得出每一个项目的宽度。
如图14A~图14B所示,图14A~图14B示例性示出了在不同的屏幕在音乐应用的内容页界面的显示形式。当电子设备200的显示屏为屏幕1时,图14A示例性的示出了音乐应用在电子设备200上的内容页界面810;内容页界面810可包括:工具栏811,控件栏812,以及8个内容列表(我的歌单和推荐歌单1~7)。其中,工具栏811包括一个或多个功能控件,提供了例如打电话、播放音乐等功能;控件栏822中包括一个或多个控件,每个控件包括两个元素,分别为图标元素和文字元素(例如“我的”)。
当电子设备200的显示屏为屏幕2时,图14B示例性的示出了音乐应用在电子设备200上的内容页界面820。内容页界面820可包括:工具栏821,控件栏822,以及6个内容列表(我的歌单和推荐歌单1~5)。其中,工具栏821,控件栏822,以及6个内容列表的描述可以参考上述图14A中工具栏811,控件栏812,以及8个内容列表的相关描述。
可以看出,对于不同的屏幕(屏幕1、屏幕2)来说,内容页界面810、内容页界面820的显示内容大体相同,但显示形式不同。例如对于宽屏(屏幕1)来说,控件栏812中控件的两个元素(图标元素和文字元素)为左右布局,即图标元素显示在文字元素的左边;而对于窄屏(屏幕2)来说,控件栏822中控件的两个元素(图标元素和文字元素)为上下布局,即图标元素显示在文字元素的上边。又例如由于屏幕1的显示界面大于屏幕2的显示界面,屏幕1中内容列表的个数为8个,屏幕2中内容列表的个数为6个。在一些实施例中,工具栏811、工具栏821的显示形式(显示位置、显示大小等)还可以通过其他方式确定。
2、二级详情页界面
二级详情页中的列表采用uikit的listpattern控件,可以有多种不同的样式,具体样式会根据应用设置或传入的不同数据自动采用不同的样式。
如图15A~图15C所示,图15A~图15C示例性示出了在不同的屏幕在音乐应用的二级详情页界面的显示形式。当电子设备200的显示屏为屏幕1时,图15A示例性的示出了地图应 用在电子设备200上的二级详情页界面910;二级详情页界面910可包括:工具栏911,歌曲信息区域912,以及3个歌曲列表(歌曲列表913~915)。
当电子设备200的显示屏为屏幕2时,图15B示例性的示出了地图应用在电子设备200上的二级详情页界面920;二级详情页界面920可包括:工具栏921,歌曲信息区域922,以及3个歌曲列表(歌曲列表923~925)。
当电子设备200的显示屏为屏幕3时,图15C示例性的示出了地图应用在电子设备200上的二级详情页界面930;二级详情页界面930可包括:工具栏931,歌曲信息区域932,以及4个歌曲列表(歌曲列表933~936)。
可以看出,对于不同的屏幕(屏幕1、屏幕2、屏幕3)来说,二级详情页界面910、二级详情页界面920、二级详情页界面930的显示内容大体相同,但显示形式不同。例如对于宽屏(屏幕1)来说,歌曲信息区域922以及3个歌曲列表(歌曲列表923~925)的宽度大于窄屏(屏幕2)的歌曲信息区域922,以及3个歌曲列表(歌曲列表923~925)。在一些实施例中,工具栏911、工具栏921、工具栏931的显示形式(显示位置、显示大小等)还可以通过其他方式确定。
3、播放页界面
播放页中会根据不同的屏幕的长宽比自动选择采用不同的布局,以此来兼容不同的屏幕。
如图16A~图16C所示,图16A~图16C示例性示出了在不同的屏幕在音乐应用的播放页界面的显示形式。当电子设备200的显示屏为屏幕1时,图16A示例性的示出了地图应用在电子设备200上的播放页界面1010;播放页界面1010可包括:工具栏1011,音乐图片1012,进度条1013,音乐信息1014、控件栏1015。
当电子设备200的显示屏为屏幕2时,图16B示例性的示出了地图应用在电子设备200上的播放页界面1020;播放页界面1020可包括:工具栏1021,音乐图片1022,进度条1023,音乐信息1024、控件栏1025。
当电子设备200的显示屏为屏幕3时,图16C示例性的示出了地图应用在电子设备200上的播放页界面1030;播放页界面1030可包括:工具栏1031,音乐图片1032,进度条1033,音乐信息1034、控件栏1035。
可以看出,对于不同的屏幕(屏幕1、屏幕2、屏幕3)来说,播放页界面1010、播放页界面1020、播放页界面1030的显示内容大体相同,但显示形式不同。例如屏幕1中音乐图片1012显示在音乐信息1014和控件栏1015的右方;屏幕2中音乐图片1022显示在音乐信息1024的右方,显示在控件栏1025的上方;屏幕2中音乐图片1032显示在音乐信息1034的上方,音乐信息1034显示在控件栏1035的上方。在一些实施例中,工具栏1011、工具栏1021、工具栏1031的显示形式(显示位置、显示大小等)还可以通过其他方式确定。
本申请实施例中,对于以上三个界面,当屏幕过小时,如果控件大小不变,可能会显示异常,故由一个总体规则来保证此种效果。可选的,设定一个最小宽度和最小高度,当屏幕的宽高低于此值时,界面包括其内的控件进行整体缩小,这样可以保证兼用所有的屏幕。
本申请提供一种芯片系统,芯片系统应用于包括存储器、显示屏和传感器的电子设备;芯片系统包括:一个或多个接口电路和一个或者多个处理器;接口电路和处理器通过线路互联;接口电路用于从存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行计算机指令时,电子设备执行前文实施例的方法。
其中,芯片系统中可以包括一个芯片,也可以包括多个芯片。在芯片系统中包括多个芯 片时,本申请对芯片的类型和数量等参数不做限定。
示例性地,本申请提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当指令在电子设备上运行时,使得电子设备执行前文实施例的添加批注的方法。
示例性地,本申请提供一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行前文实施例的添加批注的方法。
在上述实施例中,全部或部分功能可以通过软件、硬件、或者软件加硬件的组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (24)

  1. 一种应用接入方法,其特征在于,所述方法包括:
    第一电子设备运行目标应用,获取所述目标应用的第一显示内容;
    所述第一电子设备获取所述第一电子设备的屏幕显示参数;
    所述第一电子设备获取第二电子设备的屏幕显示参数;
    所述第一电子设备基于所述第一显示内容和所述第一电子设备的屏幕显示参数,确定出第一显示数据;
    所述第一电子设备基于所述第一显示内容和所述第二电子设备的屏幕显示参数,确定出第二显示数据;
    所述第一电子设备基于所述第一显示数据,显示第一界面;
    所述第一电子设备将所述第二显示数据发送给所述第二电子设备;
    所述第二电子设备基于所述第二显示数据在所述第二电子设备的显示屏上显示第二界面,所述第一界面中控件的布局和所述第二界面中控件的布局不同。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备接收作用于所述第二界面的第一触控操作;
    所述第二电子设备向所述第一电子设备发送所述第一触控操作的触控参数;
    所述第一电子设备基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作触发的功能;
    所述第一电子设备基于所述第一触控操作触发的功能获取所述目标应用的第二显示内容;
    所述第一电子设备基于所述第二显示内容和所述第二电子设备的屏幕显示参数,确定出第三显示数据;
    所述第一电子设备将所述第三显示数据发送给所述第二电子设备;
    所述第二电子设备基于所述第三显示数据在所述第二电子设备的显示屏上显示第三界面。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一电子设备接收作用于所述第一界面的第二触控操作;
    所述第一电子设备基于所述第二触控操作的触控参数,以及所述第一显示数据,确定所述第二触控操作触发的功能;
    所述第一电子设备基于所述第二触控操作触发的功能获取所述目标应用的第三显示内容;
    所述第一电子设备基于所述第三显示内容和所述第一电子设备的屏幕显示参数,确定出第四显示数据;
    所述第一电子设备基于所述第四显示数据,显示第四界面。
  4. 根据权利要求1所述的方法,其特征在于,所述屏幕显示参数包括屏幕长度和屏幕宽度,所述方法还包括:
    所述第一电子设备获取第三电子设备的屏幕显示参数,所述第三电子设备的屏幕长度大于所述第二电子设备的屏幕长度;
    所述第一电子设备基于所述第一显示内容和所述第三电子设备的屏幕显示参数,确定出第五显示数据;
    所述第一电子设备将所述第五显示数据发送给所述第三电子设备;
    所述第三电子设备基于所述第五显示数据在所述第三电子设备的显示屏上显示第五界面,所述第五界面中所述第一功能控件的显示长度大于所述第二界面中所述第一功能控件的显示长度。
  5. 根据权利要求2所述的方法,其特征在于,当所述目标应用为地图应用,所述第一显示内容包括地图底图、一个或多个功能控件;所述一个或多个功能控件包括搜索框控件;所述第二显示内容包括历史搜索记录;
    所述第一电子设备基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作触发的功能,具体包括:
    所述第一电子设备基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作为针对于所述搜索框控件的用户操作。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    所述第二电子设备接收作用于所述第三界面的第三触控操作;
    所述第二电子设备向所述第一电子设备发送所述第三触控操作的触控参数;
    所述第一电子设备基于所述第三触控操作的触控参数,以及所述第三显示数据,确定所述第二触控操作为针对所述搜索框控件输入第一文本的用户操作;
    所述第一电子设备获取以所述第一文本为目标地点的第一地址信息;
    所述第一电子设备基于所述第一地址信息和所述第二电子设备的屏幕显示参数,确定出第六显示数据;
    所述第一电子设备将所述第六显示数据发送给所述第二电子设备;
    所述第二电子设备基于所述第六显示数据在所述第二电子设备的显示屏上显示第六界面。
  7. 根据权利要求6所述的方法,其特征在于,所述第六显示数据包括所述第一地址信息和开始导航控件;所述方法还包括:
    所述第二电子设备接收作用于所述第六界面的第四触控操作;
    所述第二电子设备向所述第一电子设备发送所述第四触控操作的触控参数;
    所述第一电子设备基于所述第四触控操作的触控参数,以及所述第六显示数据,确定所述第四触控操作为针对于所述开始导航控件的用户操作;
    所述第一电子设备获取以所述第二电子设备的当前位置为出发地,以所述第一地址信息为目的地的导航信息;
    所述第一电子设备基于所述导航信息和所述第二电子设备的屏幕显示参数,确定出第七显示数据;
    所述第一电子设备将所述第七显示数据发送给所述第二电子设备;
    所述第二电子设备基于所述第七显示数据在所述第二电子设备的显示屏上显示第七界 面。
  8. 根据权利要求7所述的方法,所述导航信息包括以下至少一项:到下一个路口的距离、下一个路口的驾驶方向、下一个路口的道路名、到达目的地的剩余距离、驾驶时速、到达目的地所需时间、到达目的地剩余时间、实景图片、路况、或驾驶路线信息。
  9. 根据权利要求2所述的方法,其特征在于,当所述目标应用为音乐应用,所述第一显示内容包括一个或多个图片、一个或多个功能控件;所述一个或多个功能控件包括开始播放控件;所述第二显示内容包括播放进度指示信息;
    所述第一电子设备基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作触发的功能,具体包括:
    所述第一电子设备基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作为针对于所述开始播放控件的操作。
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:所述第一电子设备将所述第二显示内容对应的音频数据发送给所述第二电子设备;
    所述第二电子设备通过所述第二电子设备的扬声器播放所述音频数据。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述第二电子设备为车载终端。
  12. 一种应用接入系统,其特征在于,包括第一电子设备和第二电子设备,其中,
    所述第一电子设备,用于运行目标应用,获取所述目标应用的第一显示内容;
    所述第一电子设备,还用于获取所述第一电子设备的屏幕显示参数;
    所述第一电子设备,还用于获取第二电子设备的屏幕显示参数;
    所述第一电子设备,还用于基于所述第一显示内容和所述第一电子设备的屏幕显示参数,确定出第一显示数据;
    所述第一电子设备,还用于基于所述第一显示内容和所述第二电子设备的屏幕显示参数,确定出第二显示数据;
    所述第一电子设备,还用于基于所述第一显示数据,显示第一界面;
    所述第一电子设备,还用于将所述第二显示数据发送给所述第二电子设备;
    所述第二电子设备,用于基于所述第二显示数据在所述第二电子设备的显示屏上显示第二界面,所述第一界面中控件的布局和所述第二界面中控件的布局不同。
  13. 根据权利要求12所述的系统,其特征在于,所述第二设备还用于:接收作用于所述第二界面的第一触控操作;
    所述第二电子设备,还用于向所述第一电子设备发送所述第一触控操作的触控参数;
    所述第一电子设备,还用于基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作触发的功能;
    所述第一电子设备,还用于基于所述第一触控操作触发的功能获取所述目标应用的第二显示内容;
    所述第一电子设备,还用于基于所述第二显示内容和所述第二电子设备的屏幕显示参数, 确定出第三显示数据;
    所述第一电子设备,还用于将所述第三显示数据发送给所述第二电子设备;
    所述第二电子设备,还用于基于所述第三显示数据在所述第二电子设备的显示屏上显示第三界面。
  14. 根据权利要求12所述的系统,其特征在于,所述第一电子设备,还用于接收作用于所述第一界面的第二触控操作;
    所述第一电子设备,还用于基于所述第二触控操作的触控参数,以及所述第一显示数据,确定所述第二触控操作触发的功能;
    所述第一电子设备,还用于基于所述第二触控操作触发的功能获取所述目标应用的第三显示内容;
    所述第一电子设备,还用于基于所述第三显示内容和所述第一电子设备的屏幕显示参数,确定出第四显示数据;
    所述第一电子设备,还用于基于所述第四显示数据,显示第四界面。
  15. 根据权利要求12所述的系统,其特征在于,所述系统还包括第三电子设备;所述屏幕显示参数包括屏幕长度和屏幕宽度;
    所述第一电子设备,还用于获取第三电子设备的屏幕显示参数,所述第三电子设备的屏幕长度大于所述第二电子设备的屏幕长度;
    所述第一电子设备,还用于基于所述第一显示内容和所述第三电子设备的屏幕显示参数,确定出第五显示数据;
    所述第一电子设备,还用于将所述第五显示数据发送给所述第三电子设备;
    所述第三电子设备,用于基于所述第五显示数据在所述第三电子设备的显示屏上显示第五界面,所述第五界面中所述第一功能控件的显示长度大于所述第二界面中所述第一功能控件的显示长度。
  16. 根据权利要求13所述的系统,其特征在于,当所述目标应用为地图应用,所述第一显示内容包括地图底图、一个或多个功能控件;所述一个或多个功能控件包括搜索框控件;所述第二显示内容包括历史搜索记录;
    所述第一电子设备,还用于基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作为针对于所述搜索框控件的用户操作。
  17. 根据权利要求16所述的系统,其特征在于,所述第二电子设备,还用于接收作用于所述第三界面的第三触控操作;
    所述第二电子设备,还用于向所述第一电子设备发送所述第三触控操作的触控参数;
    所述第一电子设备,还用于基于所述第三触控操作的触控参数,以及所述第三显示数据,确定所述第二触控操作为针对所述搜索框控件输入第一文本的用户操作;
    所述第一电子设备,还用于获取以所述第一文本为目标地点的第一地址信息;
    所述第一电子设备,还用于基于所述第一地址信息和所述第二电子设备的屏幕显示参数,确定出第六显示数据;
    所述第一电子设备,还用于将所述第六显示数据发送给所述第二电子设备;
    所述第二电子设备,还用于基于所述第六显示数据在所述第二电子设备的显示屏上显示第六界面。
  18. 根据权利要求17所述的系统,其特征在于,所述第六显示数据包括所述第一地址信息和开始导航控件;所述第二电子设备,还用于接收作用于所述第六界面的第四触控操作;
    所述第二电子设备,还用于向所述第一电子设备发送所述第四触控操作的触控参数;
    所述第一电子设备,还用于基于所述第四触控操作的触控参数,以及所述第六显示数据,确定所述第四触控操作为针对于所述开始导航控件的用户操作;
    所述第一电子设备,还用于获取以所述第二电子设备的当前位置为出发地,以所述第一地址信息为目的地的导航信息;
    所述第一电子设备,还用于基于所述导航信息和所述第二电子设备的屏幕显示参数,确定出第七显示数据;
    所述第一电子设备,还用于将所述第七显示数据发送给所述第二电子设备;
    所述第二电子设备,还用于基于所述第七显示数据在所述第二电子设备的显示屏上显示第七界面。
  19. 根据权利要求18所述的系统,其特征在于,所述导航信息包括以下至少一项:到下一个路口的距离、下一个路口的驾驶方向、下一个路口的道路名、到达目的地的剩余距离、驾驶时速、到达目的地所需时间、到达目的地剩余时间、实景图片、路况、或驾驶路线信息。
  20. 根据权利要求13所述的系统,其特征在于,当所述目标应用为音乐应用,所述第一显示内容包括一个或多个图片、一个或多个功能控件;所述一个或多个功能控件包括开始播放控件;所述第二显示内容包括播放进度指示信息;
    所述第一电子设备,还用于基于所述第一触控操作的触控参数,以及所述第二显示数据,确定所述第一触控操作为针对于所述开始播放控件的操作。
  21. 根据权利要求20所述的系统,其特征在于,所述第一电子设备,还用于将所述第二显示内容对应的音频数据发送给所述第二电子设备;
    所述第二电子设备,还用于通过所述第二电子设备的扬声器播放所述音频数据。
  22. 根据权利要求12-21任一项所述的系统,其特征在于,所述第二电子设备为车载终端。
  23. 一种电子设备,其特征在于,包括:一个或多个处理器、一个或多个存储器;所述一个或多个存储器分别与所述一个或多个处理器耦合;所述一个或多个存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述计算机指令在所述处理器上运行时,使得所述电子设备执行如权利要求1-11任一项中所述第一电子设备或所述第二电子设备执行的应用接入方法。
  24. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-11任一项所述的应用接入方法。
PCT/CN2021/117075 2020-09-10 2021-09-08 一种应用接入方法及相关装置 Ceased WO2022052928A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21865982.9A EP4202666A4 (en) 2020-09-10 2021-09-08 APPLICATION ACCESS METHOD AND APPARATUS
US18/044,616 US20230333801A1 (en) 2020-09-10 2021-09-08 Application Access Method And Related Apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010949304 2020-09-10
CN202010949304.8 2020-09-10
CN202011062423.8 2020-09-30
CN202011062423.8A CN114168236A (zh) 2020-09-10 2020-09-30 一种应用接入方法及相关装置

Publications (1)

Publication Number Publication Date
WO2022052928A1 true WO2022052928A1 (zh) 2022-03-17

Family

ID=80476120

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117075 Ceased WO2022052928A1 (zh) 2020-09-10 2021-09-08 一种应用接入方法及相关装置

Country Status (4)

Country Link
US (1) US20230333801A1 (zh)
EP (1) EP4202666A4 (zh)
CN (1) CN114168236A (zh)
WO (1) WO2022052928A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093829A (zh) * 2023-10-19 2023-11-21 四川国蓝中天环境科技集团有限公司 一种基于车载诊断数据的劣质油品加油点识别方法和系统
CN118519599A (zh) * 2024-07-22 2024-08-20 比亚迪股份有限公司 多屏显示控制方法、系统、装置、产品、存储介质及车辆

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115835409B (zh) * 2021-09-17 2025-06-27 荣耀终端股份有限公司 协同窗口处理方法、系统及电子设备
CN116107546A (zh) * 2022-10-31 2023-05-12 浙江吉利控股集团有限公司 一种车机应用开发方法、装置、电子设备及存储介质
CN117831529A (zh) * 2023-12-28 2024-04-05 小米科技(武汉)有限公司 显示控制方法、装置、车辆、终端及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100231512A1 (en) * 2009-03-16 2010-09-16 Microsoft Corporation Adaptive cursor sizing
CN111324327A (zh) * 2020-02-20 2020-06-23 华为技术有限公司 投屏方法及终端设备
CN111399789A (zh) * 2020-02-20 2020-07-10 华为技术有限公司 界面布局方法、装置及系统
CN111596878A (zh) * 2020-05-13 2020-08-28 北京百度网讯科技有限公司 投屏方法、装置、设备以及存储介质
CN112114765A (zh) * 2020-09-27 2020-12-22 北京小米移动软件有限公司 投屏方法、装置及存储介质

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5676108B2 (ja) * 2006-12-20 2015-02-25 ジョンソン コントロールズ テクノロジー カンパニーJohnson Controls Technology Company リモートディスプレイ再現システム
US9360337B2 (en) * 2007-06-20 2016-06-07 Golba Llc Navigation system and methods for route navigation
US20100293462A1 (en) * 2008-05-13 2010-11-18 Apple Inc. Pushing a user interface to a remote device
US20090284476A1 (en) * 2008-05-13 2009-11-19 Apple Inc. Pushing a user interface to a remote device
US9311115B2 (en) * 2008-05-13 2016-04-12 Apple Inc. Pushing a graphical user interface to a remote device with display rules provided by the remote device
US8970647B2 (en) * 2008-05-13 2015-03-03 Apple Inc. Pushing a graphical user interface to a remote device with display rules provided by the remote device
US9870130B2 (en) * 2008-05-13 2018-01-16 Apple Inc. Pushing a user interface to a remote device
KR101602221B1 (ko) * 2009-05-19 2016-03-10 엘지전자 주식회사 이동 단말 및 그 제어 방법
US9218126B2 (en) * 2009-09-21 2015-12-22 Extreme Reality Ltd. Methods circuits apparatus and systems for human machine interfacing with an electronic appliance
EP2698968B1 (en) * 2011-04-15 2015-11-25 Clarion Co., Ltd. Information terminal, on-board information system, on-board device, and information terminal program
US9116563B2 (en) * 2011-10-28 2015-08-25 Honda Motor Co., Ltd. Connecting touch screen phones in a vehicle
CN103502055B (zh) * 2011-11-08 2016-04-13 松下知识产权经营株式会社 信息显示处理装置
US9310888B2 (en) * 2012-03-16 2016-04-12 Microsoft Technology Licensing, Llc Multimodal layout and rendering
CN104737104B (zh) * 2012-10-19 2017-12-19 三菱电机株式会社 信息处理装置、信息终端、信息处理系统及校准方法
US9200915B2 (en) * 2013-06-08 2015-12-01 Apple Inc. Mapping application with several user interfaces
US9772755B2 (en) * 2013-11-15 2017-09-26 Microsoft Technology Licensing, Llc Remote control for displaying application data on dissimilar screens
US10402147B2 (en) * 2016-11-09 2019-09-03 Toyota Motor Engineering & Manufacturing North America, Inc. Vehicle multimedia display system
CN107273083B (zh) * 2017-06-30 2020-05-26 百度在线网络技术(北京)有限公司 一种终端设备之间的交互方法、装置、设备和存储介质
JP7107794B2 (ja) * 2018-09-18 2022-07-27 矢崎総業株式会社 表示制御装置
US11416205B2 (en) * 2019-04-16 2022-08-16 Apple Inc. Systems and methods for initiating and interacting with a companion-display mode for an electronic device with a touch-sensitive display
CN110381195A (zh) * 2019-06-05 2019-10-25 华为技术有限公司 一种投屏显示方法及电子设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100231512A1 (en) * 2009-03-16 2010-09-16 Microsoft Corporation Adaptive cursor sizing
CN111324327A (zh) * 2020-02-20 2020-06-23 华为技术有限公司 投屏方法及终端设备
CN111399789A (zh) * 2020-02-20 2020-07-10 华为技术有限公司 界面布局方法、装置及系统
CN111596878A (zh) * 2020-05-13 2020-08-28 北京百度网讯科技有限公司 投屏方法、装置、设备以及存储介质
CN112114765A (zh) * 2020-09-27 2020-12-22 北京小米移动软件有限公司 投屏方法、装置及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4202666A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093829A (zh) * 2023-10-19 2023-11-21 四川国蓝中天环境科技集团有限公司 一种基于车载诊断数据的劣质油品加油点识别方法和系统
CN117093829B (zh) * 2023-10-19 2024-01-23 四川国蓝中天环境科技集团有限公司 一种基于车载诊断数据的劣质油品加油点识别方法和系统
CN118519599A (zh) * 2024-07-22 2024-08-20 比亚迪股份有限公司 多屏显示控制方法、系统、装置、产品、存储介质及车辆

Also Published As

Publication number Publication date
EP4202666A1 (en) 2023-06-28
US20230333801A1 (en) 2023-10-19
CN114168236A (zh) 2022-03-11
EP4202666A4 (en) 2024-02-21

Similar Documents

Publication Publication Date Title
CN108845856B (zh) 基于对象的同步更新方法、装置、存储介质及设备
WO2022052928A1 (zh) 一种应用接入方法及相关装置
CN118860249B (zh) 一种设备交互方法、电子设备及系统
WO2020177622A1 (zh) Ui组件显示的方法及电子设备
CN113127130B (zh) 页面跳转方法、装置及存储介质
US20150130705A1 (en) Method for determining location of content and an electronic device
US11991040B2 (en) Network configuration method and device
WO2022089207A1 (zh) 一种跨设备应用交互方法、电子设备与服务器
CN108762881B (zh) 界面绘制方法、装置、终端及存储介质
KR20150026056A (ko) 곡면 바닥을 가지는 전자 장치 및 그 동작 방법
WO2022161119A1 (zh) 一种显示方法及电子设备
WO2022156535A1 (zh) 分布式应用的处理方法和装置
CN114610419B (zh) 添加widget的方法、装置及计算机可读存储介质
CN111580892A (zh) 一种业务组件调用的方法、装置、终端和存储介质
CN108848492A (zh) 用户身份识别卡的启用方法、装置、终端及存储介质
US20160019602A1 (en) Advertisement method of electronic device and electronic device thereof
CN114329292A (zh) 资源信息的配置方法、装置、电子设备以及存储介质
CN116095230B (zh) 应用程序推荐方法和终端设备、可读存储介质
CN109101158A (zh) 导入歌曲列表的方法、装置及存储介质
CN116668997A (zh) 定位方法、用户界面及电子设备
CN115905374A (zh) 应用功能的展示方法、装置、终端及存储介质
EP4621539A1 (en) Method for implementing media playback control, electronic device, system, and readable storage medium
CN112231619A (zh) 转换方法、装置、电子设备及存储介质
CN121711429A (zh) 一种卡片显示方法及电子设备
CN116389587A (zh) 内容共享系统和方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21865982

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021865982

Country of ref document: EP

Effective date: 20230323

NENP Non-entry into the national phase

Ref country code: DE