Method for switching between intelligent terminal and application program
By deploying the map drawing function of the Android navigation application as a service component and using TextureView and AIDL technology for map rendering, the problem of map screen flickering when the navigation application is switched is solved and the user experience is improved.
Patent Information
- Application Number
- CN201711452618.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2017-12-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2037-12-28
AI Technical Summary
Existing Android navigation applications need to reload map data and create a GL Surface when switching, resulting in flickering of the displayed map screen and poor user experience.
By deploying the map drawing function of the application with navigation function as a service component, using the TextureView architecture to extract the Surface architecture from the second application, and passing it to the MapViewService architecture layer of the operating system for rendering through AIDL, the seamless map is achieved Toggle and hover displays.
It achieves seamless switching of map display between applications, avoids map screen flickering, and improves user experience.
Smart Images

Figure CN109976884B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent terminals, and in particular to a method for switching between application programs and an intelligent terminal. Background Art
[0002] The Global Positioning System (GPS) is a new generation of satellite navigation and positioning system developed by the United States since the 1970s and fully completed in 1994. It has the ability to conduct all-round real-time three-dimensional navigation and positioning at sea, on land and in the air. The GPS system can be used not only for measurement and navigation, but also for speed and time measurement. Through the accurate positioning of satellite signals received by GPS, the vehicle's route, location, speed, altitude and other information can be obtained.
[0003] Geographic Information System (GIS) began to appear in the late 1950s and early 1960s. It is a software system that has gradually emerged in human production and practice activities to describe and process relevant geographic information. It uses computers as a means to process spatial data with geographic characteristics, taking one spatial information as the main line and combining various other spatial location information related to it. It has functions such as collecting, managing, analyzing and expressing data. Secondly, the data processed by GIS has a direct or indirect relationship with geographic information. Geographic information is the representation of the nature, characteristics, and movement status of geographic entities and all useful knowledge, while geographic data is the symbolic representation of the relationship between various geographic characteristics and phenomena.
[0004] In recent years, in addition to the traditional in-vehicle anti-theft and anti-robbery devices, GPS technology has been increasingly widely used in combination with GIS systems and in-vehicle navigation systems. With the development of the automobile industry and the gradual maturity of the automotive electronics market, in-vehicle navigation products have begun to take shape. In Europe, the United States and Japan, such in-vehicle navigation systems are already widely used, and the domestic GPS car navigation products also have a rapidly growing market trend.
[0005] Android is a mobile terminal operating system based on the Linux platform. In recent years, it has won a large number of users with its advantages of open source, high efficiency and the promotion of manufacturers. Most mobile terminals with Android as the operating system have high-speed computing and GPS functions, and have a bright future in function expansion.
[0006] However, current Android navigation usually exists as an independent App application. When using the LBS (navigation) function on any interface, you always need to jump to the navigation first and then perform corresponding operations to display the specified POI location or plan the path to the specified POI. Since it involves switching between two independent App applications, the map data navigation loaded by the App using the LBS function needs to be reloaded when switching the navigation App, and the GL Surface needs to be recreated, causing the displayed map screen to flicker and a poor user experience. Summary of the invention
[0007] The purpose of the present invention is to provide a method for switching between an intelligent terminal and an application, which can realize seamless switching of map display between a second application and a first application with a navigation function, so that the displayed map screen is flicker-free and the user experience is good.
[0008] The present invention provides a method for switching between applications, the switching method comprising: when it is detected that a second application triggers a map function, calling a service component of a first application with a navigation function to start a map drawing function and display the drawn map; when an operation instruction to switch the first application is detected, switching the first application to display the drawn map.
[0009] In one embodiment, when an operation instruction to switch the first application is detected, the first application is switched to display the drawn map, specifically including: enlarging the drawn map as a background, and floating the operation interface of the first application on the drawn map.
[0010] In one embodiment, the switching method further includes: deploying the map drawing function of the first application with navigation function in the operating system architecture layer in the form of a service component.
[0011] In one embodiment, the switching method is applied to the Android system, and the use of the service component to start the map drawing function specifically includes: using the service component to extract the Surface architecture from the TextureView architecture of the second application; passing the Surface architecture into the MapViewService architecture layer of the operating system for rendering.
[0012] In one embodiment, the passing the Surface architecture into the MapViewService architecture layer of the operating system for rendering specifically includes: passing the Surface architecture into the MapViewService architecture layer of the operating system by way of Android remote calling interface definition language AIDL.
[0013] The present invention also provides an intelligent terminal, which includes a processor, and the processor is used to execute program data to achieve the steps of switching between applications, including: when it is detected that a second application triggers a map function, calling a service component of a first application with a navigation function to start a map drawing function and display the drawn map; when an operation instruction to switch the first application is detected, switching the first application to display the drawn map.
[0014] In one embodiment, when the processor detects an operation instruction to switch the first application, it switches the first application to display the drawn map, specifically including: enlarging the drawn map as the background, and floating the operation interface of the first application on the drawn map.
[0015] In one embodiment, the processor is used to execute program data to implement the step of switching between application programs, and further includes: deploying the map drawing function of the first application program with navigation function in the operating system architecture layer in the form of a service component.
[0016] In one embodiment, the smart terminal adopts the Android system, and the processor uses the service component to start the map drawing function, which specifically includes: using the service component to extract the Surface architecture from the TextureView architecture of the second application; passing the Surface architecture into the MapViewService architecture layer of the operating system for rendering.
[0017] In one embodiment, the processor passes the Surface architecture to the MapViewService architecture layer of the operating system for rendering, specifically including: passing the Surface architecture to the MapViewService architecture layer of the operating system by remotely calling the Android interface definition language AIDL.
[0018] The method for switching between the intelligent terminal and its applications of the present invention calls the service component of the first application with a navigation function to start the map drawing function and display the drawn map when detecting that the second application triggers the map function, and switches the first application to display the drawn map when detecting the operation instruction to switch the first application. In this way, the maps displayed by the first application and the second application are the same, and there is no need to load data separately. When the second application switches to the first application, the displayed map is flicker-free, and the user experience is good.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 The figure is a flow chart of the method for switching between application programs of the present invention.
[0021] Figure 2 A system architecture diagram for implementing the method for switching between application programs of the present invention.
[0022] Figure 3 Schematic diagram of the modules of the intelligent terminal of the present invention. DETAILED DESCRIPTION
[0023] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following, in combination with the accompanying drawings and preferred embodiments, describes in detail the specific implementation methods, methods, steps, structures, features and effects of the switching method between the smart terminal and its application programs and the unmanned vehicle proposed in the present invention.
[0024] The above and other technical contents, features and effects of the present invention will be clearly presented in the following detailed description of the preferred embodiments with reference to the drawings. Through the description of the specific implementation methods, the technical means and effects adopted by the present invention to achieve the predetermined purpose can be more deeply and specifically understood. However, the drawings are only for reference and explanation purposes and are not used to limit the present invention.
[0025] See also Figure 1 , Figure 1 2 is a flow chart of a method for switching between application programs of the present invention. In this embodiment, the switching method includes but is not limited to the following steps.
[0026] Step S101: deploying a map drawing function of a first application program having a navigation function in an operating system architecture layer in the form of a service component.
[0027] Specifically, the map drawing function of the first application with navigation function is deployed in the operating system (OS) architecture layer in the form of a service component. In this way, a unified map drawing function can be provided to other applications running on the operating system.
[0028] Step S102, when it is detected that the second application has triggered the map function, the service component of the first application with the navigation function is called to start the map drawing function and display the drawn map.
[0029] Step S103, when an operation instruction to switch the first application is detected, the first application is switched to display the drawn map.
[0030] In one embodiment, switching the first application to display the drawn map may specifically include, but is not limited to: using the drawn map as a background, and suspending the operation interface of the first application on the drawn map.
[0031] The operation interface may include, but is not limited to, a command input box, navigation route prompt information obtained based on a route calculation function, and route guidance information such as "turn right".
[0032] Specifically, when the navigation route information is received, the drawn map may be enlarged with the starting point input by the user or the located starting point as the center and used as the background, but the present invention is not limited thereto.
[0033] In this embodiment, the switching method of this embodiment can be applied to the Android system, and the use of the service component to start the map drawing function can specifically include: using the service component to extract the Surface architecture from the TextureView architecture of the second application; passing the Surface architecture into the MapViewService architecture layer of the operating system for rendering.
[0034] It should be noted that in this embodiment, TextureView can be used to display content streams, such as video or OpenGL scene content streams, which can come from the current application and other processes. OpenGL refers to OpenGraphics Library, which is a professional graphics programming interface that defines a cross-programming language and cross-platform programming interface specification.
[0035] For further information, see Figure 2 , Figure 2 To implement the system architecture diagram of the switching method between applications of the present invention, this embodiment transfers the Surface architecture to the MapViewService architecture layer of the operating system for rendering, which may specifically include:
[0036] The Surface architecture is passed into the MapViewService architecture layer of the operating system;
[0037] Create an EGLSurface in the MapViewService architecture layer using the passed-in Surface architecture;
[0038] Add the EGLSurface to the rendering queue of GLThread, and render the EGLSurface in GLThread.
[0039] Among them, MapViewService, EGLSurface, GLThread, etc. in this implementation are all standard module architectures in the Android system, and are within the scope of understanding of personnel in this technical field and are not described in detail.
[0040] It should be noted that, in this implementation, the process of transferring the Surface architecture to the MapViewService architecture layer of the operating system may specifically include:
[0041] The Surface architecture is transferred to the MapViewService architecture layer of the operating system by means of the Android remote calling interface definition language AIDL.
[0042] Among them, AIDL (Android Interface Definition Language) in this embodiment is the definition language of the Android remote call interface, which inherits the Binder class under Android (Binder is the implementation class of IBinder), and can transfer data through ServiceConnection, such as transferring various navigation operation instructions, etc. In one embodiment, AIDL interfaces such as request, response, and notification can be defined in the SDK for the second application to interact with the map and transfer various navigation operation instructions to achieve communication between the first and second application processes.
[0043] In this implementation manner, the rendering of the EGLSurface in the GLThread may further include:
[0044] Detecting whether there is a predetermined operation to close or hide the second application in the background;
[0045] When it is detected that there is a predetermined operation of closing or hiding the second application in the background, the EGLSurface corresponding to the second application is removed from the rendering queue of the GLThread.
[0046] See also Figure 3 , Figure 3 Schematic diagram of a module of the intelligent terminal of the present invention. In this embodiment, the intelligent terminal includes a processor 31, a memory 32 and a display 33. The processor 31 is used to execute program data to implement the steps of switching between application programs, which may specifically include:
[0047] When the second application is detected to trigger the map function, the service component of the first application with the navigation function is called to start the map drawing function and display the drawn map;
[0048] When an operation instruction to switch the first application is detected, the first application is switched to display the drawn map.
[0049] In one embodiment, the map drawing function of the first application with navigation function can be deployed in the operating system architecture layer in the form of a service component. In this way, a unified map drawing function can be provided to other applications running on the operating system.
[0050] Specifically, the smart terminal adopts the Android system, and the processor 31 uses the service component to start the map drawing function, which may specifically include:
[0051] Extracting a Surface structure from a TextureView structure of a second application using the service component;
[0052] The Surface architecture is passed to the MapViewService architecture layer of the operating system for rendering.
[0053] In a specific implementation, the processor 31 transfers the Surface architecture to the MapViewService architecture layer of the operating system for rendering, which may specifically include:
[0054] The Surface architecture is passed into the MapViewService architecture layer of the operating system;
[0055] Create an EGLSurface in the MapViewService architecture layer using the passed-in Surface architecture;
[0056] Add the EGLSurface to the rendering queue of GLThread, and render the EGLSurface in GLThread.
[0057] It should be noted that the processor 31 may transfer the Surface architecture to the MapViewService architecture layer of the operating system, which may specifically include:
[0058] The Surface architecture is transferred to the MapViewService architecture layer of the operating system by means of the Android remote calling interface definition language AIDL.
[0059] In addition, the processor 31 renders the EGLSurface in GLThread, and then may further include:
[0060] Detecting whether there is a predetermined operation to close or hide the second application in the background;
[0061] When it is detected that there is a predetermined operation of closing or hiding the second application in the background, the EGLSurface corresponding to the second application is removed from the rendering queue of the GLThread.
[0062] In this embodiment, the memory 32 may be used to store program data. When the program data is executed by the processor 31, the method steps involved in this embodiment may be implemented.
[0063] The display 33 can be used to display a map, an application UI interface, and other visual interfaces of the smart terminal.
[0064] It is worth mentioning that the intelligent terminal may be, but is not limited to, a navigator, a vehicle-mounted device, a mobile phone, a tablet computer or a virtual reality device.
[0065] The present invention will be described below in conjunction with a specific example of an Android system.
[0066] The map drawing / rendering process of this embodiment can adopt the GLSurfaceView architecture in the Android system, which can:
[0067] 1> Manage the Surface of the application, and use the special memory function of Surface to directly layout it on the Android view;
[0068] 2> Manage EGL display and let OpenGL render the content onto the above Surface;
[0069] 3>Implement a custom renderer;
[0070] 4> Let the renderer run in an independent thread, separate from the UI user interface thread;
[0071] 5>Implement on-demand rendering and continuous rendering.
[0072] Among them, Surface (EGLSurface) is an abstraction of the memory area FrameBuffer used to store images, including Color Buffer, Stencil Buffer, Depth Buffer, etc. Context (EGLContext) stores some state information of OpenGLES drawing.
[0073] The map drawing / rendering steps of this embodiment may include:
[0074] Get the EGLDisplay object;
[0075] Initialize the connection with EGLDisplay;
[0076] Get the EGLConfig object;
[0077] Create an EGLContext instance;
[0078] Create an EGLSurface instance;
[0079] Connect EGLContext and EGLSurface;
[0080] Use GL instructions to draw graphics;
[0081] Disconnect and release the EGLContext object associated with the EGLSurface;
[0082] Delete the EGLSurface object;
[0083] Delete the EGLContext object;
[0084] Terminates the connection to the EGLDisplay.
[0085] It is not difficult to understand that the present invention can be specifically applied to Android systems, navigators, vehicle-mounted navigation devices, mobile phones, tablet computers or virtual reality devices, which can include system frameworks, user interaction interfaces UI, GIS navigation engines, JNI modules and navigation information service modules in the prior art.
[0086] For example, in this embodiment, the Android system can be developed based on the Android application component to manage the coordinated operation of each navigation module and serve as a bridge for communication between each module. The system framework can mainly include server components, Activity components, and JNI calls. Third-party software obtains the functions provided in the server by binding the server component. The server communicates with JNI through the system management framework (application) to obtain the GIS map engine to implement the services provided. And it is presented to the user through the Activity component.
[0087] The user interaction interface includes a display and a touch screen response module. The display is used to display the entire navigation car information system and supports 3D drawing, while the touch screen response module is used to receive user interface operation information.
[0088] The JNI module is written in Java and is a bridge that enables the navigation vehicle information management framework and the GIS map engine to communicate with each other. JNI receives and listens to the GPS information sent by the Android system GPS module, and passes the GPS information to the GIS map engine through the JNI interface after processing, thereby changing the navigation vehicle information. The system calls all navigation services of the GIS map engine and the GIS map engine operations of the user interaction interface. The two-way information transmission is provided by the JNI module.
[0089] The GIS map engine communicates and collaborates with the entire system framework through the JNI module and manages all navigation information, including the location information management module, map data drawing module, planning and navigation module, map information query module, and user information management module.
[0090] The GIS map engine of this embodiment can be developed in C++ and encapsulated using Android dynamic libraries. The system efficiency is better than that of Java development. The GIS engine dynamic library interacts with the interactive system framework through JNI calls to pass various processed information to users and navigation services. The location information management module is used to locate and obtain the geographical location of the car through satellites, and manage this information; the map data drawing module is used to draw maps based on the geographical location of the car, such as POI (point of interest), administrative districts, annotations, green spaces, water systems, etc.; the planning and navigation module is used to plan routes and navigate through road data and personal location information; the map information query module provides query of specified points and their surrounding map information, such as POI, administrative division information, road information, gate address information, real-time traffic information, etc.; the user information management module is used to manage personal navigation information set by users, such as personal navigation history, location favorites, itinerary planning management, personal settings, etc.
[0091] In addition, the navigation information service module of the present embodiment is used to provide the required navigation information operations for third-party software through a specified AIDL interface, including a client binding module, an AIDL service interface module and an AIDL callback module. The client binding module manages the binding and disconnection between the third-party software and the module. The third-party software can bind to the module by creating a new service connection. After binding, it can obtain the functions in the navigation car information service, thereby realizing communication between processes. AIDL service interface module: The compiler generates a standard AIDL interface class by parsing the AIDL interface file. The car information service implements the given functional interface by inheriting this class. AIDL callback module: After the third-party software calls the navigation car information service, the navigation car information service can feedback information to the third-party software through this module, making up for the deficiency of AIDL's one-way communication and forming a complete communication mechanism.
[0092] In summary, the switching method between applications and the smart terminal of the present invention can realize seamless switching of the map display of the second application and the first application with navigation function through a map process, so that the displayed map screen is flicker-free and the user experience is good.
[0093] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the terminal type embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0094] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A method for switching between applications, characterized in that: The switching method comprises: When detecting that the second application triggers the map function, calling the service component of the first application with the navigation function to start the map drawing function and display the drawn map; When an operation instruction to switch the first application is detected, switching the first application to display the drawn map; When the operation instruction to switch the first application is detected, switching the first application to display the drawn map specifically includes: The depicted map is enlarged as a background, and an operation interface of the first application is suspended on the depicted map, wherein the operation interface includes navigation route prompt information and / or route guidance information obtained based on a route calculation function.
2. The switching method according to claim 1, characterized in that: The switching method further includes: deploying the map drawing function of the first application program having the navigation function in the operating system architecture layer in the form of a service component.
3. The switching method according to claim 2, characterized in that: The switching method is applied to the Android system, and uses the service component to start the map drawing function, specifically including: Extracting a Surface structure from a TextureView structure of a second application using the service component; The Surface architecture is passed to the MapViewService architecture layer of the operating system for rendering.
4. The switching method according to claim 3, characterized in that: The step of transferring the Surface architecture to the MapViewService architecture layer of the operating system for rendering specifically includes: The Surface architecture is transferred to the MapViewService architecture layer of the operating system by means of the Android remote calling interface definition language AIDL.
5. An intelligent terminal, characterized in that: The intelligent terminal includes a processor, and the processor is used to execute program data to implement the steps of switching between application programs. When detecting that the second application triggers the map function, calling the service component of the first application with the navigation function to start the map drawing function and display the drawn map; When an operation instruction to switch the first application is detected, the first application is switched to display the drawn map; when the processor detects the operation instruction to switch the first application, the first application is switched to display the drawn map, specifically including: The depicted map is enlarged as a background, and an operation interface of the first application is suspended on the depicted map, wherein the operation interface includes navigation route prompt information and / or route guidance information obtained based on a route calculation function.
6. The intelligent terminal according to claim 5, characterized in that: The processor is used to execute program data to implement the step of switching between application programs further comprising: The map drawing function of the first application program having the navigation function is deployed in the operating system architecture layer in the form of a service component.
7. The intelligent terminal according to claim 6, characterized in that: The smart terminal adopts the Android system, and the processor uses the service component to start the map drawing function, which specifically includes: Extracting a Surface structure from a TextureView structure of a second application using the service component; The Surface architecture is passed to the MapViewService architecture layer of the operating system for rendering.
8. The intelligent terminal according to claim 7, characterized in that: The processor transfers the Surface architecture to the MapViewService architecture layer of the operating system for rendering, specifically including: The Surface architecture is transferred to the MapViewService architecture layer of the operating system by means of the Android remote calling interface definition language AIDL.
