WO2023155561A1 - 在Linux兼容安卓系统上进行左右分屏的方法 - Google Patents

在Linux兼容安卓系统上进行左右分屏的方法 Download PDF

Info

Publication number
WO2023155561A1
WO2023155561A1 PCT/CN2022/138111 CN2022138111W WO2023155561A1 WO 2023155561 A1 WO2023155561 A1 WO 2023155561A1 CN 2022138111 W CN2022138111 W CN 2022138111W WO 2023155561 A1 WO2023155561 A1 WO 2023155561A1
Authority
WO
WIPO (PCT)
Prior art keywords
android
screen
linux
android system
application
Prior art date
Application number
PCT/CN2022/138111
Other languages
English (en)
French (fr)
Inventor
彭韬
杨硕
李翔
黄晟
黄彩龙
马超
游远
赵坤
谢辉军
杨陈博寰
Original Assignee
麒麟软件有限公司
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 麒麟软件有限公司 filed Critical 麒麟软件有限公司
Publication of WO2023155561A1 publication Critical patent/WO2023155561A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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

Definitions

  • This application relates to the technical field of Android graphics display, in particular to a method for splitting left and right screens on a Linux-compatible Android system.
  • Android application ecology has shown explosive development. In many fields, it has surpassed the Windows application ecology and iOS application ecology, and has become the most widely used application ecology. .
  • Android is currently the Linux operating system with the highest market share in the mobile terminal market, and has an excellent ecological environment in the field of mobile terminals; the Windows system occupies the largest share of the PC market. system, there are huge security risks in information network security; and the Linux operating system, as the predecessor of Android, has developed slowly due to the limitation of the number of developers and market share, and the ecological environment has been in a bad state for a long time and has not improved.
  • Android has a wide user group in the field of mobile terminals, and has a mature development platform and application software group, which has certain reference value for solving the current dilemma of the Linux operating system.
  • the Android operating system Since the Android operating system is developed based on the Linux kernel, it has made great improvements and enhancements in the user space for the characteristics of mobile terminal devices, so it provides great possibility and convenience for the Linux operating system to be compatible with Android applications, making mobile terminal devices Rich applications are likely to run successfully on the PC side.
  • the compatible support of the Android application ecosystem on the Linux operating system has become a research hotspot. Many researchers at home and abroad have tried to migrate the Android operating environment to a Linux-like computer platform to achieve the effect of compatible support for the Android application ecosystem on the Linux operating system. , derived from various compatible technologies, including Google's ARC (App Runtime for Chrome) technology, virtual machine and emulator technology, Anbox (Android in a Box) project, etc.
  • the application generally adopts the display mode of vertical screen and single screen during use.
  • This display mode runs on a monitor that is generally longer than wide, and the display effect is not so beautiful.
  • the Linux-side window program forcibly changes the display effect to be the same as the native running program, that is, the aspect ratio is similar to that of the monitor.
  • most Android applications are adapted to mobile terminals. screen display, if the Linux side changes the window length and width, the Android application will not be suitable for this resolution, resulting in the icons and images in the application being pulled up; moreover, the PC operation is the same as the mobile terminal operation, which is a single operation scenario.
  • the embodiment of the present application provides a method for splitting the left and right screens on the Linux compatible Android system, in order to solve the problem that the existing Android application does not adapt to the widescreen display resolution of the Linux PC when it is transferred to the Linux PC, which leads to problems in the application. Defects such as icons and images being stretched and deformed; and the Android application can only be operated on the Linux PC terminal just like the mobile terminal operation, which is a single operation scene and cannot be operated in multiple scenes, resulting in a large screen on the Linux PC terminal display The advantages of the display cannot be brought into play, and technical problems that affect the user experience.
  • the application provides a method for splitting the left and right screens on the Linux compatible Android system, the method comprising the following steps: selecting the Android system image file and preprocessing the Android system image file; running docker on the Linux system
  • the Android system in the container the Linux system creates an Android application display window; the Android system receives the startup command of the Linux system, creates a virtual screen and binds the Android application display window; the Android system starts the Android Applied to the virtual screen; the Android system splits the left and right screens of the virtual screen where the Android application is located; adds the interface jump matching rules of the Android application in the memory; when the Android application jumps to the interface , choose to launch to the left screen or the right screen according to the interface jump matching rule.
  • the selection of the Android system image file and preprocessing the Android system image file may include the following steps: selecting the Android system platform that supports the split-screen mode scheme for system customization; uploading the Android system to the original physical The scheme of screen split mode is transplanted to the virtual screen.
  • running the Android system in the docker container on the Linux system includes the following steps: using the docker container on the Linux system to load the image of the Android system, allowing the Linux system and the Android system to Sharing the same Linux system kernel; starting the Android system environment in the docker container.
  • the Android system divides the virtual screen where the Android application is located to the left and right, including the following steps: obtaining the task ID of the task stack where the Android application interface in the virtual screen is located; according to the Task ID, execute Android The method setTaskWindowingModeSplitScreenPrimary in the Activity task management service class, the Android system will perform split-screen display on the current virtual screen.
  • the Android system parses the resource files in the Android application, and saves the interface jump matching rules with the preset left and right screens in the memory, including the following steps: analyzing the Android application.
  • the resource file of the interface jump matching rule do preset rules for the Android application without the resource file of the interface jump matching rule; save the analyzed interface jump matching rule or the preset rule to memory.
  • the Android application when the Android application jumps to the interface, it selects to start to the left screen or the right screen according to the interface jump matching rule, including the following steps: adding an interceptor in the Activity startup process; When the Android application interface jumps for the first time, the Activity startup process is intercepted; then the Activity startup process currently described on the left screen is matched with the pre-started Activity startup process according to the interface jump matching rule; the match conforms to the described If the interface jumps to match the rules, set the intent flag in the startup intention, and the Android application interface starts to the right screen; otherwise, the Android application interface starts to the left screen according to the current Activity startup process.
  • the method for splitting the left and right screens on the Linux compatible Android system provided by the application comprises the following steps: selecting the Android system image file and preprocessing the Android system image file; Run the Android system in the docker container; the Linux system creates an Android application display window; the Android system receives the startup command of the Linux system, creates a virtual screen and binds the Android application display window; the Android system starts The Android application is applied to the virtual screen; the Android system divides the virtual screen where the Android application is located; the interface jump matching rule of the Android application is added in the memory; the Android application jump interface , choose to start to the left screen or the right screen according to the interface jump matching rules; through the above method, a left-right split-screen mechanism is provided for Android applications running on the Linux system in an Android system compatible environment, and the Android system The physical screen split-screen mode scheme is transformed, and it is transplanted into the self-created virtual screen, so that when the Android application starts, it can realize the effect of horizontal screen display and left-right split screen,
  • Fig. 1 is a schematic flow diagram of a method for splitting left and right screens on a Linux compatible Android system provided in the embodiment of the present application;
  • Fig. 2 is a schematic diagram of the Android application split screen displayed on the Linux desktop operating system in the method for splitting the left and right screens on the Linux compatible Android system provided in the embodiment of the application;
  • FIG. 3 is a flow chart of an Android application screen splitting process in a left-right screen splitting method based on Android multi-windows on a Linux-compatible Android system provided in an embodiment of the present application.
  • the method for splitting the left and right screens on the Linux compatible Android system is applied in the environment of the Linux compatible Android system, so that the Android application is displayed in a left and right split screen mode, and the method includes the following steps:
  • the Android system receives the startup command of the Linux system, creates a virtual screen and binds the Android application display window;
  • S6 The Android system divides the virtual screen on the left and right of the Android application
  • the Android system in the container is modified, and the original Android system runs on the mobile phone.
  • Split-screen mode that belongs to the physical screen. Transplant the split-screen mode scheme of the physical screen to the virtual screen. The specific steps, the first step, need to shield the restriction on the screen ID in the original physical split-screen process. This is done to pass in the virtual screen ID parameter to the subsequent call of the split-screen interface.
  • the physical split screen process can be followed; the second step is to remove the central axis after the split screen (the line that exists in the middle of the left and right split screens after the original physical screen split screen, drag left and right to modify the size of the left and right screens), because most of the screens on the market There is a fixed limit to the application resolution, and dragging left and right will cause the application to be incompatible.
  • the Android system When the Linux system sends an instruction to start an Android application, the Android system creates a virtual screen, and the Linux system will create a display window and bind it to the virtual screen; the Android system will analyze the resource files in the application, and if there is a resource file with interface jump matching rules, then Save it to the memory, if it does not exist, then preset the rules to the memory; when the Android application interface is started, execute the split-screen mode interface, when the user operates the Android application interface to jump, the Android system will start the modified Activiy The process is filtered and intercepted by rules.
  • the intent logo will be set to start to the right screen, otherwise, the original process will be used to start the left screen; thus it is more in line with the widescreen display effect of the Linux PC, and it also avoids operating Android applications under the Linux PC.
  • it is necessary to interrupt the current scene, thereby reducing the cumbersome process of scene interruption and recovery, thereby improving user efficiency and making a revolutionary breakthrough in the Android application experience.
  • select the Android system image file and preprocess the Android system image file including the following steps: select the Android system platform that supports the split-screen mode scheme to customize the system; the original physical screen split-screen mode scheme on the Android system is transplanted to the virtual screen ;Through the above method, for the mirror image of the Android system platform, the version that supports the split-screen mode scheme should be selected for mirroring, and the process of the Android system split-screen mode should be studied, and the restriction on the screen ID in the process is shielded, and the framework (framework ) layer structure of the virtual screen split screen interface for the application layer to improve the efficiency of the virtual screen split screen.
  • running the Android system in the docker container (the running instance of the docker image, which can be regarded as a simple version of the linux environment) on the Linux system includes the following steps: use docker to load the image of the Android system on the Linux system, and let the Linux system Share the same Linux system kernel with the Android system; start the Android system environment in the container; first create a docker container to load the Android system image after the above modification, so that the Android system shares the Linux system kernel, and start the Android system, and the Linux system executes the graphics display program , to render the image data in the virtual screen.
  • the Android system divides the virtual screen where the Android application is located, including the following steps: obtaining the task ID where the Android application is located in the virtual screen; executing the Android application according to the task ID.
  • the method setTaskWindowingModeSplitScreenPrimary in the Activity (single screen with user interface) task management service class (ActivityTaskManagerService) (set the window mode of the current task to split screen mode, and display the current task as the main screen), the Android system will split the current virtual screen display; through the above method, the split-screen display problem of the virtual screen is solved, and the efficiency of splitting the left and right screens of the Android application on the virtual screen is improved.
  • the Android system analyzes the resource files in the Android application, and saves the interface jump matching rules with the preset left and right screens in the memory, including the following steps: analyzing the resource files of the interface jump matching rules existing in the Android application; Make preset rules for Android applications with resource files without interface jump matching rules; the interface jump matching rules are similar to key-value pairs, the key (Key) indicates the current interface on the left screen, and the value (value) indicates the pre-launched interface; save the analyzed and pre-set interface jump matching rules to the memory; through the above method, improve the setting and saving efficiency of the interface jump matching rules, and then improve the Android application jump interface to realize left and right split screen efficiency.
  • the Android application when it jumps to the interface, it chooses to start to the left screen or the right screen according to the interface jump matching rules, including the following steps: in the Activity (Activity is a component of an application program, providing a screen that the user can use to interact
  • an interceptor is added to the startup process of an Android interface in popular terms; the interceptor intercepts the Activity startup process every time the Android application interface jumps; then the current Activity startup process on the left screen and the pre-launched
  • the activity startup process is matched according to the interface jump matching rules; if the match meets the interface jump matching rules, set the intent flag in the startup intent, and the Android application interface starts to the right screen; otherwise, the Android application interface starts according to the current Activity
  • the process starts to the left screen; through the above method, the efficiency of the Android application jump interface to realize the left and right split screens is improved.
  • two windows are started on the Linux operating system, and the Android applications running on the left and right split screens are two independent display areas.
  • the two left and right split screens in the same window are the same.
  • the two different Activity displays of the application allow users to process multiple events at the same time, which effectively avoids the interruption of the current event when processing multiple events, improves the user's efficiency, and makes full use of the large-screen display of multiple events on the Linux PC terminal.
  • Advantages of the Android application interface are possible.
  • the Android system will allocate the DisplayId of the virtual screen for the management of each virtual screen.
  • the Android system judges whether to use the split-screen mode according to the started package name, and obtains the The DisplayId assigned by the current virtual screen calls the previously encapsulated split-screen interface through the DisplayId.
  • the Android system will create two stacks split-screen-primary and split-screen-secondary, corresponding to the left screen and the right screen respectively. In addition to the stack fullscreen of the screen itself, this corresponds to the full-screen stack, where the interface jump is the operation of pushing, popping, and moving the Task created by the Android system in the stack.
  • the Android system will analyze the resource files in the app, and the parsed rules will be saved in the memory. If there is no resource file, the preset rules will be saved in the memory; when the user encounters an interface jump when using the app, Then use the left screen interface to match the rules with the interface to be started. If the match is successful, add the startup parameters and start to the right screen.
  • the Android applications on the terminal when there are multiple scenes to be processed, the current scene needs to be interrupted, thereby reducing the cumbersome process of scene interruption and recovery, thereby improving user efficiency and making the Android application experience better. Revolutionary breakthrough.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

本申请公开了在Linux兼容安卓系统上进行左右分屏的方法,所述方法包括以下步骤:选择Android系统镜像文件并对所述Android系统镜像文件做预处理;Linux系统上运行docker容器里所述Android系统;所述Linux系统创建Android应用显示视窗;所述Android系统接收Linux系统的启动命令,创建虚拟屏并绑定所述Android应用显示视窗;所述Android系统启动应用至虚拟屏;所述Android系统对Android应用所在虚拟屏进行左右分屏;在内存中添加所述Android应用的界面跳转匹配规则;所述Android应用跳转界面时,根据所述界面跳转匹配规则来选择启动至左屏或右屏;本发明更加契合宽屏显示,带来了两个窗口同时显示的交互体验,使多个创建的Android应用达到左右分屏的效果,有效地避免了多个应用场景被中断的情况。

Description

在Linux兼容安卓系统上进行左右分屏的方法 技术领域
本申请涉及Android图形显示的技术领域,尤其涉及在Linux兼容安卓系统上进行左右分屏的方法。
背景技术
近年来,随着Android用户的增长以及Android软硬件产品的成熟和发展,Android应用生态呈现出爆发式发展,在很多领域都已经超过Windows应用生态和iOS应用生态,成为目前使用最广泛的应用生态。Android基于Linux内核发展而来,是目前移动终端市场中市场份额最高的Linux类操作系统,在移动终端领域具有极好的生态环境;Windows系统占据着PC市场的最大份额,其作为美国闭源操作系统,在信息网络安全方面存在巨大安全隐患;而Linux操作系统,其作为Android的前身,由于开发人员数目和市场份额的限制,发展较为缓慢,生态环境长期处于不良状态,一直不见起色。随着信息技术的飞速发展,国家对信息安全的重视程度日益提升,国内基于开源Linux操作系统的自主操作系统日益发展壮大,但Linux操作系统生态应用的严重缺乏仍旧是困扰Linux操作系统真正推向市场的一大痛点。
技术问题
而要解决Linux操作系统的生态应用问题,必须解决用户数不足和平台应用软件数不足这两个关键点。Android在移动终端领域具有广泛的用户群,并且具有成熟的开发平台和应用软件群体,对于解决Linux操作系统目前的窘境具有一定的参考价值。
由于Android操作系统基于Linux内核发展而来,其针对移动终端设备的特点在用户空间做了大幅的改进和增强,所以给Linux操作系统兼容Android应用提供了极大的可能性和便利,使得移动端的丰富应用很有可能成功运行在PC端。近年来,Android应用生态在Linux操作系统上的兼容支持成为了研究热点,国内外有许多研究人员尝试将Android运行环境迁移到Linux类计算机平台以实现Android应用生态在Linux操作系统上兼容支持的效果,各种兼容技术衍生而出,其中就包括Google的 ARC(App Runtime for Chrome)技术、虚拟机和模拟器技术、Anbox(Android in a Box)项目等,这些技术将PC端和移动端进行融合,成功将Android应用生态迁移到Linux上来,极大地推动了Linux应用生态的发展,很大程度上弥补了Linux应用缺乏的诟病,方便了Linux操作系统用户的日常办公、娱乐等需求,也加快了Linux操作系统走向消费市场的步伐,但它们都还存在着无法忽视的用户体验问题,包括稳定性、易用性、功能完备性等,导致这块技术领域没有显著的提升。
目前运行在PC操作系统上Android运行环境,应用在使用过程中一般采用竖屏与单屏的显示模式,这种显示模式运行在普遍长大于宽的显示器中,显示效果并不是那么美观,相较于原生的运行程序会显得突兀;如果Linux端窗口程序强行将显示效果改为与原生运行程序一样,也就是长宽比与显示器差不多,众所周知,大部分的Android应用为适应手机终端,都是竖屏显示的,如果Linux端改变窗口长宽,会导致Android应用不适配这种分辨率,导致应用内图标、图像拉升;再者,PC操作还和手机终端操作一样,是单操作场景,这样显示器大屏显示的优势就无法发挥,如果是应用窗口内左右分屏,创造两个场景,这样再处理另一场景时,则无需中断当前场景的操作。结合以上两点,为充分发挥现有硬件性能,提升PC上运行Android应用的显示效果以及用户的使用体验。
技术解决方案
本申请实施例提供了在Linux兼容安卓系统上进行左右分屏的方法,用以解决现有的Android应用在转移至Linux PC端时,不适配Linux PC端的的宽屏显示分辨率,导致应用内图标、图像被拉升变形等缺陷;以及存在着Android应用在Linux PC端操作上只能和手机终端操作一样,为单操作场景,不能进行多场景操作的缺陷,导致了Linux PC端显示器大屏显示的优势无法发挥,影响用户使用体验的技术问题。
有鉴于此,本申请提供了在Linux兼容安卓系统上进行左右分屏的方法,所述方法包括以下步骤:选择Android系统镜像文件并对所述Android系统镜像文件做预处理;Linux系统上运行docker容器里的所述Android系统;所述Linux系统创建Android应用显示视窗;所述Android系统接收Linux系统的启动命令,创建虚拟屏并绑定所述Android应用显示视窗;所述Android系统启动所述Android应用至所述虚拟屏;所述Android系统对所述Android应用所在的所述虚拟屏进行左右分屏;在内存中添加所述Android应用的界面跳转匹配规则; 所述Android应用跳转界面时,根据所述界面跳转匹配规则来选择启动至左屏或右屏。
可选地,所述选择Android系统镜像文件并对所述Android系统镜像文件做预处理,包括以下步骤:选择支持分屏模式方案的所述Android系统平台进行系统定制;将所述Android系统上原物理屏分屏模式的方案移植至所述虚拟屏。
可选地,所述Linux系统上运行docker容器里的所述Android系统,包括以下步骤:在所述Linux系统上使用docker容器加载所述Android系统的镜像,让所述Linux系统和所述Android系统共享同一所述Linux系统内核;在所述docker容器中启动所述Android系统环境。
可选地,所述Android系统对所述Android应用所在的所述虚拟屏进行左右分屏,包括以下步骤:获取所述虚拟屏中所述Android应用界面所在的任务栈的任务ID;根据所述任务ID,执行Android Activity任务管理服务类中的方法setTaskWindowingModeSplitScreenPrimary,所述Android系统将对当前所述虚拟屏进行分屏显示。
可选地,所述Android系统解析所述Android应用内的资源文件,并保存与预设定左右屏幕的界面跳转匹配规则至内存中,包括以下步骤:解析所述Android应用内存在的所述界面跳转匹配规则的资源文件;对无所述界面跳转匹配规则的资源文件的所述Android应用做预设定规则;将解析的所述界面跳转匹配规则或所述预设定规则保存至内存中。
可选地,所述Android应用跳转界面时,根据所述界面跳转匹配规则来选择启动至左屏或右屏,包括以下步骤:在Activity启动流程中添加拦截器;所述拦截器在每次Android应用界面跳转时对所述Activity启动流程进行拦截;再将左屏当前所述Activity启动流程与预启动的所述Activity启动流程按所述界面跳转匹配规则进行匹配;匹配符合所述界面跳转匹配规则的,则在启动意图中设置意图标识,所述Android应用界面启动至右屏;反之,所述Android应用界面则按所述当前Activity启动流程,启动至左屏。
从以上技术方案可以看出,本申请实施例具有以下优点:
本申请提供的在Linux兼容安卓系统上进行左右分屏的方法,与现有技术相比,所述方法包括以下步骤:选择Android系统镜像文件并对所述Android系统镜像文件做预处理;Linux系统上运行docker容器里的所述Android系统;所述Linux系统创建Android应用显示视窗;所述Android系统接收Linux系统的启动命令,创建虚拟屏并绑定所述Android应用显示视窗;所述Android系统启动所述Android应用至所述虚拟屏;所述Android系统对所述Android应用所在的虚拟屏进行左右分屏;在内存中添加所述Android应用的界面跳转匹配规则; 所述Android应用跳转界面时,根据所述界面跳转匹配规则来选择启动至左屏或右屏;通过以上方法,为运行在Linux系统上Android系统兼容环境中的Android应用提供一种左右分屏的机制,将Android系统物理屏分屏模式的方案进行改造,将其移植到自创建的虚拟屏当中,使Android应用启动时,可以实现横屏显示并且左右分屏的效果,提供了更好的显示和交互体验,更加符合Linux PC端宽屏的显示效果,也避免了在Linux PC端下操作Android应用时,遇到多个场景要处理时,需中断当前场景的情况,进而减少场景被中断和恢复的繁琐过程,从而提升了用户的使用效率,使Android应用的使用体验有了革命性的突破。
附图说明
为了更清楚地表达说明本申请实施例的技术方案,下面将对实施例描述所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例中提供的在Linux兼容安卓系统上进行左右分屏的方法的流程示意图;
图2为本申请实施例中提供的在Linux兼容安卓系统上进行左右分屏的方法中在Linux桌面操作系统显示的Android应用分屏的示意图;
图3为本申请实施例中提供的一种在Linux兼容Android系统上基于Android多窗口的左右分屏方法中Android应用分屏过程的流程图。
本发明的最佳实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
为了便于理解,请参阅图1至图3,本申请提供了以下实施例:
实施例1
在Linux兼容安卓系统上进行左右分屏的方法,该方法应用在Linux兼容Android系统的环境中,使得Android应用以左右分屏的方式显示出来,该方法包括以下步骤:
S1:选择Android系统镜像文件并对Android系统镜像文件做预处理;
S2:Linux系统上运行docker(docker镜像的运行实例,可以看作是一个简易版的linux环境)容器里的Android系统;
S3:Linux系统创建Android应用显示视窗;
S4:Android系统接收Linux系统的启动命令,创建虚拟屏并绑定Android应用显示视窗;
S5:Android系统启动Android应用至虚拟屏;
S6:Android系统对Android应用所在的虚拟屏进行左右分屏;
S7:在内存中添加Android应用的界面跳转匹配规则;
S8:在Android应用跳转界面时,根据界面跳转匹配规则来判断是否跳转屏幕;
在本申请实施例中,当基于Linux系统启动Android应用左右分屏时,具体地,首先对容器内Android系统进行改造,原Android系统运行在手机上可以通过设置对手机进行上下分屏,这就属于物理屏幕的分屏模式。将物理屏幕的分屏模式方案移植到虚拟屏幕上,具体步骤,第一步,需屏蔽原物理分屏流程中对于屏幕ID的限制,这样做是为了后续调用分屏接口传入虚拟屏幕ID参数时,能走物理分屏流程;第二步,移除分屏之后中轴线(原物理屏分屏之后存在于左右分屏中间的线,左右拖动修改左右屏幕大小),由于市面上大部分应用分辨率的固定限制,左右拖动将会导致应用的不兼容。当Linux系统发送启动Android应用指令时,Android系统创建虚拟屏,Linux系统将创建显示视窗绑定到虚拟屏;Android系统将解析应用内的资源文件,如果存在界面跳转匹配规则的资源文件,则保存至内存中,如果不存在,则预设定规则至内存中;当Android应用界面启动完成时,执行分屏模式接口,当用户操作Android应用界面跳转时,Android系统对于改造之后的Activiy启动流程进行规则过滤拦截,拦截成功,则设置意图标识启动至右屏,反之,则走原流程启动左屏;进而更加符合Linux PC端宽屏的显示效果,也避免了在Linux PC端下操作Android应用时,遇到多个场景要处理时,需中断当前场景的情况,进而减少场景被中断和恢复的繁琐过程,从而提升了用户的使用效率,使Android应用的使用体验有了革命性的突破。
进一步的,选择Android系统镜像文件并对Android系统镜像文件做预处理,包括以下步骤:选择支持分屏模式方案的Android系统平台进行系统定制;Android系统上原物理屏分屏模式的方案移植至虚拟屏;通过以上方法,对于Android系统平台的镜像,应选择支持分屏模式方案的版本进行镜像,且研究Android系统分屏模式的流程,并对流程中对屏幕ID的限制进行屏蔽,将framework(框架)层构造的虚拟屏幕分屏的接口供应用层使用,进而提高虚拟屏幕分屏的效率。
进一步的,Linux系统上运行docker容器(docker镜像的运行实例,可以看作是一个简易版的linux环境)里的Android系统,包括以下步骤:Linux系统上使用docker加载Android系统的镜像,让Linux系统和Android系统共享同一Linux系统内核;容器中再启动Android系统环境;先创建docker容器加载上述改造之后的Android系统镜像,使得Android系统共用Linux系统端的内核,并启动Android系统,Linux系统执行图形显示程序,去渲染虚拟屏幕中的图像数据。
进一步的,Android系统对Android应用所在的虚拟屏进行左右分屏,包括以下步骤:获取虚拟屏中Android应用所在的任务ID;根据任务ID,执行Android Activity(具有用户界面的单一屏幕)任务管理服务类(ActivityTaskManagerService)中的方法setTaskWindowingModeSplitScreenPrimary(设置当前任务的窗口模式为分屏模式,将当前任务作为主屏显示),Android系统将对当前虚拟屏幕进行分屏显示;通过以上方法,解决了虚拟屏幕的分屏显示问题,提高Android应用在虚拟屏上进行左右分屏的效率。
进一步的,Android系统解析Android应用内的资源文件,并保存与预设定左右屏幕的界面跳转匹配规则至内存中,包括以下步骤:解析Android应用中存在的界面跳转匹配规则的资源文件;对无界面跳转匹配规则的资源文件的Android应用做预设定规则;界面跳转匹配规则类似于键值对,键(Key)则表示左屏当前界面,值(value)则表示预启动的界面;将解析后和预设定完的界面跳转匹配规则保存至内存中;通过以上方法,提高界面跳转匹配规则的设定和保存效率,进而提高Android应用跳转界面实现左右分屏的效率。
进一步的,Android应用跳转界面时,根据界面跳转匹配规则来选择启动至左屏或右屏,包括以下步骤:在Activity(Activity是一个应用程序的组件,提供一个屏幕,用户可以用来交互为了完成某项任务,通俗点为一个Android界面)启动流程中添加拦截器;拦截器在每次Android应用界面跳转时对Activity启动流程进行拦截;再将左屏当前Activity启动流程与预启动的Activity启动流程按界面跳转匹配规则进行匹配;匹配符合界面跳转匹配规则的,则在启动意图中设置意图标识,Android应用界面启动至右屏;反之,Android应用界面则按所述当前Activity启动流程,启动至左屏;通过以上方法,提高了Android应用跳转界面实现左右分屏的效率。
实施例2
如图2中,在Linux操作系统上启动了两个窗口,其中运行的都是左右分屏的Android应用,左右分屏是两块独立的显示区域,同一窗口中的两个左右分屏是同一应用的两个不同Activity显示,用户可以同时处理多个事件,有效地避免了处理多个事件时,当前事件被中断的情况,提高用户的使用效率,发挥了Linux PC端显示器大屏显示多个Android应用界面的优势。
如图3中,每当启动一个Android应用时,Android系统会分配虚拟屏的DisplayId,用于各虚拟屏幕的管理,Android系统根据启动的包名判断是否需要采用分屏模式,如果分屏则获取当前虚拟屏幕分配的DisplayId,通过DisplayId调用之前封装好的分屏接口,分屏完成之后Android系统会创建两个栈split-screen-primary和split-screen-secondary,分别对应着左屏和右屏,加上屏幕本身的栈fullscreen,这个对应的就是全屏的栈,其中界面的跳转就是Android系统创建的Task在栈中作进栈、出栈以及移栈的操作。
以上流程完成时Android系统再对应用内的资源文件进行解析,解析的规则保存至内存中,如无资源文件则预设定规则保存至内存中;用户使用应用过程中,遇到界面跳转,则用左屏界面与欲启动的界面进行规则匹配,匹配成功则添加启动参数,启动至右屏,反之,则走原启动流程;进而更加符合PC端宽屏的显示效果,也避免了在Linux PC端下操作Android应用时,遇到多个场景要处理时,需中断当前场景的情况,进而减少场景被中断和恢复的繁琐过程,从而提升了用户的使用效率,使Android应用的使用体验有了革命性的突破。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (6)

  1. 在Linux兼容安卓系统上进行左右分屏的方法,其特征在于,所述方法包括以下步骤:
    选择Android系统镜像文件并对所述Android系统镜像文件做预处理;
    Linux系统上运行docker容器里的所述Android系统;
    所述Linux系统创建Android应用显示视窗;
    所述Android系统接收Linux系统的启动命令,创建虚拟屏并绑定所述Android应用显示视窗;
    所述Android系统启动所述Android应用至所述虚拟屏;
    所述Android系统对所述Android应用所在的所述虚拟屏进行左右分屏;
    在内存中添加所述Android应用的界面跳转匹配规则;
    所述Android应用跳转界面时,根据所述界面跳转匹配规则来选择启动至左屏或右屏。
  2. 根据权利要求1所述的在Linux兼容安卓系统上进行左右分屏的方法,其特征在于,所述选择Android系统镜像文件并对所述Android系统镜像文件做预处理,包括以下步骤:
    选择支持分屏模式方案的所述Android系统平台进行系统定制;
    将所述Android系统上原物理屏分屏模式的方案移植至所述虚拟屏。
  3. 根据权利要求1所述的在Linux兼容安卓系统上进行左右分屏的方法,其特征在于,所述Linux系统上运行docker容器里的所述Android系统,包括以下步骤:
    所述Linux系统上使用docker加载所述Android系统的镜像,让所述Linux系统和所述Android系统共享同一所述Linux系统内核;
    所述容器中启动所述Android系统环境。
  4. 根据权利要求1所述的在Linux兼容安卓系统上进行左右分屏的方法,其特征在于,所述Android系统对所述Android应用所在的所述虚拟屏进行左右分屏,包括以下步骤:
    获取所述虚拟屏中所述Android应用界面所在的任务栈的任务ID;
    根据所述任务ID,执行Android Activity任务管理服务类中的方法setTaskWindowingModeSplitScreenPrimary,所述Android系统将对当前所述虚拟屏进行分屏显示。
  5. 根据权利要求1所述的在Linux兼容安卓系统上进行左右分屏的方法,其特征在于,所述Android系统解析所述Android应用内的资源文件,并保存与预设定左右屏幕的界面跳转匹配规则至内存中,包括以下步骤:
    解析所述Android应用内存在的所述界面跳转匹配规则的资源文件;
    对无所述界面跳转匹配规则的资源文件的所述Android应用做预设定规则;
    将解析的所述界面跳转匹配规则或所述预设定规则保存至内存中。
  6. 根据权利要求1所述的在Linux兼容安卓系统上进行左右分屏的方法,其特征在于,所述Android应用跳转界面时,根据所述界面跳转匹配规则来选择启动至左屏或右屏,包括以下步骤:
    在Activity启动流程中添加拦截器;
    所述拦截器在每次Android应用界面跳转时对所述Activity启动流程进行拦截;
    再将左屏当前所述Activity启动流程与预启动的所述Activity启动流程按所述界面跳转匹配规则进行匹配;
    匹配符合所述界面跳转匹配规则的,则在启动意图中设置意图标识,所述Android应用界面启动至右屏;
    反之,所述Android应用界面则按所述当前Activity启动流程,启动至左屏。
PCT/CN2022/138111 2022-02-15 2022-12-09 在Linux兼容安卓系统上进行左右分屏的方法 WO2023155561A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210134802.6A CN114185508B (zh) 2022-02-15 2022-02-15 在Linux兼容安卓系统上进行左右分屏的方法
CN202210134802.6 2022-02-15

Publications (1)

Publication Number Publication Date
WO2023155561A1 true WO2023155561A1 (zh) 2023-08-24

Family

ID=80545866

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/138111 WO2023155561A1 (zh) 2022-02-15 2022-12-09 在Linux兼容安卓系统上进行左右分屏的方法

Country Status (2)

Country Link
CN (1) CN114185508B (zh)
WO (1) WO2023155561A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114185508B (zh) * 2022-02-15 2022-04-26 麒麟软件有限公司 在Linux兼容安卓系统上进行左右分屏的方法
CN114780199B (zh) * 2022-06-17 2022-08-23 北京麟卓信息科技有限公司 一种多窗口模式下安卓应用显示输出的共享方法
CN116627579B (zh) * 2023-07-24 2023-10-31 麒麟软件有限公司 一种在Linux上缩放安卓应用窗口的方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190102566A1 (en) * 2017-09-29 2019-04-04 Foundation Of Soongsil University-Industry Cooperation Linux based android container platform, device equipped with the same and method for apply security system in linux based android container environment
CN112860363A (zh) * 2021-02-07 2021-05-28 麒麟软件有限公司 一种基于Linux系统的Android应用窗口状态动态更新方法
CN113157362A (zh) * 2021-04-27 2021-07-23 麒麟软件有限公司 一种应用于Linux上Android多窗口显示方法
CN113254154A (zh) * 2021-05-21 2021-08-13 技德技术研究所(武汉)有限公司 一种在Linux上兼容运行Android系统的应用启动方法及装置
CN114185508A (zh) * 2022-02-15 2022-03-15 麒麟软件有限公司 在Linux兼容安卓系统上进行左右分屏的方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786424B (zh) * 2015-12-23 2018-11-16 南京富士通南大软件技术有限公司 嵌入式系统的单屏幕快速分屏显示解决的方法
CN105447898B (zh) * 2015-12-31 2018-12-25 北京小鸟看看科技有限公司 一种虚拟现实设备中显示2d应用界面的方法和装置
CN106055246B (zh) * 2016-05-25 2019-11-19 努比亚技术有限公司 一种移动终端及其操作方法
CN107402709A (zh) * 2017-06-23 2017-11-28 努比亚技术有限公司 一种分屏显示方法、终端及计算机可读存储介质
US10956508B2 (en) * 2017-11-10 2021-03-23 Palantir Technologies Inc. Systems and methods for creating and managing a data integration workspace containing automatically updated data models
CN111597006A (zh) * 2020-05-19 2020-08-28 Oppo广东移动通信有限公司 应用分屏方法、装置、存储介质及电子设备
CN112269604B (zh) * 2020-11-11 2021-06-01 北京技德系统技术有限公司 在Linux上兼容运行Android应用的窗口交互方法及装置
CN112099923B (zh) * 2020-11-17 2021-02-05 江苏北弓智能科技有限公司 一种运行于Linux操作系统上的Android虚拟化系统
CN113342422A (zh) * 2021-06-29 2021-09-03 技德技术研究所(武汉)有限公司 一种Linux兼容Android的多应用访问摄像头方法及装置
CN113900754B (zh) * 2021-10-09 2023-10-31 深圳技德智能科技研究院有限公司 共享桌面方法、装置、计算机设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190102566A1 (en) * 2017-09-29 2019-04-04 Foundation Of Soongsil University-Industry Cooperation Linux based android container platform, device equipped with the same and method for apply security system in linux based android container environment
CN112860363A (zh) * 2021-02-07 2021-05-28 麒麟软件有限公司 一种基于Linux系统的Android应用窗口状态动态更新方法
CN113157362A (zh) * 2021-04-27 2021-07-23 麒麟软件有限公司 一种应用于Linux上Android多窗口显示方法
CN113254154A (zh) * 2021-05-21 2021-08-13 技德技术研究所(武汉)有限公司 一种在Linux上兼容运行Android系统的应用启动方法及装置
CN114185508A (zh) * 2022-02-15 2022-03-15 麒麟软件有限公司 在Linux兼容安卓系统上进行左右分屏的方法

Also Published As

Publication number Publication date
CN114185508B (zh) 2022-04-26
CN114185508A (zh) 2022-03-15

Similar Documents

Publication Publication Date Title
WO2023155561A1 (zh) 在Linux兼容安卓系统上进行左右分屏的方法
EP2075976B1 (en) Adaptive Streaming for On Demand Wireless Services
US7716685B2 (en) Pluggable window manager architecture using a scene graph system
US20060200738A1 (en) System and method for modifying a mobile device application
CN113157362B (zh) 一种应用于Linux上Android多窗口显示方法
CN108600331B (zh) 交互界面呈现方法、客户端、终端及系统
CN105404539A (zh) 客户端游戏向网页游戏移植的方法、网页游戏系统及终端
CN112860363A (zh) 一种基于Linux系统的Android应用窗口状态动态更新方法
CN113663325B (zh) 虚拟场景中团队的创建方法、加入方法、装置及存储介质
CN110955499B (zh) 处理器核心配置方法、装置、终端及存储介质
CN105487752A (zh) 一种应用控制方法及应用该方法的终端
WO2020143159A1 (zh) 一种用户界面的处理方法和装置
CN107391119B (zh) 一种横竖屏实现方法及装置
CN110968395B (zh) 一种在模拟器中处理渲染指令的方法及移动终端
CN108984171A (zh) 基于Unity3D的场景持续构建方法、存储介质
US20200125243A1 (en) Terminal, split-screen display method for screen thereof, and storage device
CN106843794B (zh) 一种基于安卓的分屏显示方法和系统
EP3680765A1 (en) Navigation bar control method and device
WO2024103831A1 (zh) 一种桌面窗口显示方法、装置、终端及存储介质
CN112307403A (zh) 页面渲染方法、装置、存储介质以及终端
CN102904925B (zh) 一种基于三屏互动的跨平台widget中间件系统
CN114217763B (zh) 在Linux上兼容Android应用的窗口双屏协同显示方法
CN117555459A (zh) 一种应用组处理方法、装置、存储介质及电子设备
CN114610384A (zh) 一种应用迁移方法、装置、设备及存储介质
CN115794095B (zh) 基于JavaScript的虚幻引擎UI开发方法及系统

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: 22926864

Country of ref document: EP

Kind code of ref document: A1