Multi-window mode on Android 5. Multi-window mode: an additional competitive advantage for Android applications


We translate... Translate Chinese (Simplified) Chinese (Traditional) English French German Italian Portuguese Russian Spanish Turkish

Unfortunately, we are unable to translate this information right now - please try again later.

Review

Simultaneous work with multiple windows in Android is an interesting feature that can make your application stand out from many others and give it an additional competitive advantage. Many OEMs and ODMs, such as Samsung, Ramos and Huawei, are customizing the basic Android system. In particular, they are introducing support for multi-window mode. They do this in order to increase the attractiveness of their smartphones and tablets, to distinguish them from the bulk of devices that do not support such a function.

Picture 1. Scenarios for using multi-window mode

Preliminary information

In June 2012 it was introduced Cornerstone is the first open source platform for multitasking on Android. In August 2012, Samsung released the first device that supports multi-window mode. From 2013 to the present day, one can observe the explosive growth of solutions to support simultaneous work with multiple windows in Android.

In May 2015, Android M Developer Preview was released (today, in July, Preview 2 is already available). The official release of Android M (6.0) is expected in the fall of 2015. Among other innovations, Android M Preview 2 is notable for its support for multi-window mode.

Figure 2. Development of solutions to support multitasking in Android

There are two approaches to working with multiple windows: using floating and docked windows. Among the main features of working in multi-window modes are opening and closing windows (open/close), changing their size (resize) and relative position (swap). By opening or closing a window, we, accordingly, enable or disable multi-window mode. The resizing feature allows you to adjust the size of windows. Rearranging windows is an action that allows you to change their places.

Figure 3.Multi-window window styles

In 2013, many solutions designed to work with multiple windows appeared on the market. They have been developed by OEMs, ODMs, independent software vendors, and the open source community. In the table below you can find a comparison of various technologies for organizing multi-window work in the Android environment.

ProductCornerstone Standout Xposed Tieto
DescriptionFramework for organizing multitasking work in Android OSAn open source library that can be used to create applications with floating windowsMulti-window application that supports docked windowsThe project aims to create a work environment reminiscent of working on a desktop PC
Supports opening, closing windows, resizing, expanding to full screenYesYesYesYes
Window stylePinnedfloatingPinnedFixed and floating
Code modificationAt the Android platform levelAt the application levelAt the Android platform levelAt the Android platform level
Application supportAll applications are supported; however, SurfaceView dynamic configuration is not available.Some supporting applications. For example, a calculator.Compatibility and stability of the solution needs to be improved.Supports all applications.
Android versionAndroid 4.1 ~Android 4.4Android 4.1~
Android 4.4
Android 4.4Android 4.4
Official sitehttp://www.onscreen.comhttp://forum.xda-developers.com/showthread.php?t=1688531http://forum.xda-developers.com/xposedhttps://github.com/tieto/multiwindow_for_android

Software architecture

The Android platform code can be modified to support additional features. The Android OS architecture consists of several layers.

In the case of Android 4.2 and Android 4.3, the launcher and other applications are placed in one stack at startup, called the “main stack”. As you know, multi-window mode requires more stacks to accommodate multiple windows. As a result, you need to modify the ActivityManagerService system class by adding an interface to it for creating and managing a stack. To modify the platform class WIndowManagerService, which allows you to manage graphical views of applications, you need to modify the InputManager. This is necessary so that it can redirect touch events to the appropriate windows.

With the release of Android 4.4 and Android 5.0, the approach to stack management has changed significantly. The shell and other applications can run on different stacks. Support for multiple stacks and the ability to manage them have been added to the system. The figure below shows the differences in working with the stack in different versions of Android.

Figure 4. Comparison of working with a stack in Android 4.3 and Android 4.4

Now let's focus on Android 5 (Lollipop). Android OS uses callback mechanisms to execute Activity interface functions. However, the control function is implemented at the platform level. So now we'll look at two important classes: ActivityManagerService and WindowManagerService.

Figure 5. Lollipop platform software structure

Activity Management in Lollipop

Since the ability to work in multi-window mode depends on the stack, the following shows how you can create a stack and how you can run an Activity on that stack. In Lollipop, the following functions have been added to the IactivityManager.java interface:.

Once started, the SystemServer process calls activity manager services and windows management services. In order to observe this process, we can add commands to throw a runtime exception (RuntimeException) at the appropriate places.

Figure 6. The process of creating a stack in Lollipop

Now let's see how to launch an Activity on the stack:

Figure 7. Launching an Activity on a Stack

In Lollipop, adb (android debug bridge) added the following commands.

In Lollipop, the following commands were added to the ADB (Android Debug Bridge) utility:

Window management in Lollipop

WindowManagerService is the central part of the window management system. Its functionality includes dispatching input events, controlling the location of objects on the screen and the surfaces on which graphic elements are displayed.

Figure 8. Role of WindowsManagerService in Android Graphics Architecture

Multi-window problems

When working in multi-window mode, you can resize windows. There are examples when the size of the window displaying game animation cannot be changed. The main reason for this is that the Android SurfaceFlinger subsystem cannot dynamically change the size of the output image.

Figure 9. Games using SurfaceFlinger cannot dynamically resize the window

Another problem is that some applications do not display correctly in multi-window mode. In the picture below you can see that the calculator is not displayed correctly in multi-window mode. It's all about the application's layout, which is not designed for such conditions of use.

Figure 10.Calculator with a layout that is not designed to work in multi-window mode

Multi-window support in Android M

Android M Developer Preview 2 can be run on Nexus 5, 6, 9 and Nexus Player. If you don’t have such a device, or you don’t want to install an OS on it that is in Preview status, you can get acquainted with Android M using the emulator in Android Studio. In particular, we are now interested in standard tools for working in multi-window mode.

In order to see this mode in action, just create a new virtual device using the AVD Manager tool, choosing one of those available with the Level MNC API as the system image. In our case, it was the x86_64 image. Next, you need to launch the emulator, go to the Developer settings section and enable the Multi-window mode option there. If you can't find such an option, take a look at this guide

Now comes the fun part. To begin with, you can launch several applications, everything will be as usual. But if you click on the button for calling up the list of recently opened applications, a new icon will appear in the title bars of the window thumbnails. By default, this is a frame indicating that the application is running in full screen mode. If you click on this icon, a window layout selection menu will appear.

Figure 11.Multi-window mode in Android M

It is still unknown whether working with multiple windows will be available in the official release of Android M. However, for example, the system calculator feels good in this mode. As a result, we have good reason to believe that the day is not far off when adapting applications for multi-window mode will turn from a competitive advantage into an urgent necessity.

If you want to equip your applications designed for earlier versions of Android with support for multiple windows, it's time to turn to the third-party solutions discussed above. For example, to Cornerstone.

Example: Cornerstone

Onskreen created Cornerstone, the first multi-window framework on Android. It is designed for devices with large screens and tablets. The source code can be downloaded on Github. It supports Android versions 4.1 and 4.2. Cornerstone has not yet been released for later versions of this OS. However, you can analyze the source code for Android 4.2 in order to find out the technical details of the system.

Figure 12. Cornerstone Modifications in Android Jelly Bean

Results

Many mobile devices running Android OS use Intel® processors. How can developers improve the user experience of their apps? How to make applications more competitive? These questions lead us to continually improve products on Intel Architecture (IA) devices. Multi-window support is a good example of a useful feature that gives applications a competitive advantage. This is convenient; multi-window mode gives the user the opportunity to perform several tasks simultaneously. For example, watch a video and write a review to your friends about what you watch. For example, play a game and read its reviews. Today, multiple devices support multi-window mode. For example, these are the Ramos i12, Teclast x98 and Cube i7 tablets, which runs Remix OS.

Figure 13.Multi-window mode on IA devices

The official announcement of Android 6.0 took place last fall. As befits any major update, Marshmallow brought a large number of changes to Google's mobile operating system. However, it recently became clear that some of the system’s functions are hidden from the eyes of ordinary users. To gain access to hidden functionality, you need to do a number of simple steps. In this article we will tell you how to enable multi-window mode on Android 6.0.

First of all, we need to say that this instruction will only be relevant for those users who have root rights on their devices.


After the reboot, you will have an additional icon in the menu of all open applications, which will allow you to use multi-window mode on Android 6.0 Marshmallow.

Unfortunately, the functionality of this mode is still extremely limited. The user cannot independently change the width of windows or select applications to display. The developer himself calls this feature a test feature, and it will begin to function fully only with the next updates. It is curious that in customized versions of firmware, for example in

As we already know, the Android Nougat version comes with a lot of features that can make the user experience as smooth as possible. Highlights of the latest Android update include an improved notification panel, data transfer and power saving optimizations, and support for virtual reality devices. One of the most important aspects of the innovation, which has won many fans (including us), is the set of task management options. Thanks to the latest Android 7.0 Nougat update, you can now use two apps simultaneously in multi-window mode.

Note

We want to inform you that not all applications are the same in nature,
and for this reason, you will find that not all of them are compatible with multi-window mode. However, you should not worry - it is not your fault, but the fault of the developers, since they will need some more time to create the next update before other applications can work in the above mode. Today there is a way to get around this problem. You can run any application in multi-window mode from the "Developer Tools" in the latest version of Google's mobile operating system.

Run any application in multi-window mode in Android Nougat

First, you need to activate the “Developer Tools” item on your phone. To do this, go to “Settings > Developer tools > About device”. Next, click on the build number several times until you see a message saying that you have become a developer.

Now go back to the settings menu again and open Developer Tools. Scroll to the bottom of the page and enable the “Force operations resizing” option. When you do this, you will need to restart your device to activate this option. After this, even those applications that were not compatible with the Nougat update will be able to work in multi-window mode.

Finally, to take advantage of multi-window mode, open two apps of your choice, then press and hold the multitasking key. Now both of these applications will open in multi-window mode.

Do you think multi-window mode will be useful for your multitasking needs? Or will you stick with a more traditional single-tasking approach for now? Share your thoughts with us in the comments.

Attention! The article uses screenshots and options from the Android 7.1 operating system. Although most of the described elements should be present in other versions of Android, the author does not guarantee this.

How to enable developer options

Despite the fact that this article will focus on settings for developers, do not be intimidated by this name. Some of the options presented in this section will also be useful to ordinary users. By default they are not shown in the settings, but this is easy to fix.

  1. Open Android settings and go to About phone.
  2. Scroll to the very bottom. Find the line "Build number".
  3. Make seven quick taps on this element in a row. As a result, a notification should be displayed stating that you have now become a developer, and the corresponding section will appear in the settings menu.

Now let's take a look at some of the opportunities available to us.

Some developers specifically disable the ability to install to an SD card in their applications. Using the “Allow saving to external storage” switch, you can allow this regardless of the developer’s wishes.

Please note that the developer may have a valid reason for prohibiting installation on an external card. Some programs are strictly tied to a specific location and will not work if they are not installed where the developer intended. Therefore, you should use this feature with caution.

Multi-window mode is a feature of the latest versions of operating systems from Google. However, for this function to work, not only the correct version of Android is required, but also support in the applications themselves, which, unfortunately, not all developers have taken care of.

Using the “Resize in multi-window mode” option, you can use any application in this mode.

Typically, smartphones automatically turn off the screen during inactivity to save battery power. However, in some cases this feature is not needed. For example, if you want to use an old smartphone as a table clock or in a car as a navigator.

The “Keep the screen on” option will allow the smartphone to remain in active mode the entire time it is connected to the charger.

This is one of the most useful options that allows you to achieve significant visual acceleration of Android. The fact is that some manufacturers, in pursuit of wow effects, overload the operating system with beautiful animation.

In this section of developer options, you can independently set the time they are displayed or disable them altogether. As a result, it will seem that the system has simply begun to fly.

If your device uses an AMOLED screen, then the number of colors displayed really matters to save battery. To last even longer on the remaining charge, simply activate monochrome mode. This option is also hidden in the developer settings and is called “Simulate anomaly”.

What useful options for developers do you use?

In the new version of the operating system, Google has implemented a very necessary feature - multi-windows in Android Nougat. This feature allows you to run any application in windows, and not like Samsung and LG, which only allow you to use multi-window for some applications. This means the new feature works for almost all apps, all the time.

However, there are limitations. First, the feature probably won't work with legacy apps that weren't updated at the time. Secondly, you cannot launch the same application in a new window. Luckily, there's a solution for the latter: an app called Parallel Windows for Nougat.

Before we talk about how to use Parallel Windows, it is worth noting that this application is in the Alpha stage of development and is experimental, so some errors may occur. Keep this in mind when testing the application! Also, it goes without saying (but I'll say it anyway): you need to have Nougat to use this app.

So, now we can tell you how to run multi-window in Android Nougat. First, install Parallel Windows (it's free). After installation, launch the application.

How to install Parallel Windows

After launching the application, a warning will be displayed stating that the application is experimental. Click the “I have read and understood” box, then click “Continue.”

On the next screen, you need to give two permissions to take advantage of all the features of Parallel Windows. Click on the first switch “Permit to draw over Apps”, you will be taken to the permission menu where you need to enable it. Once you enable the permission, go back to the Parallel Windows application.

Next, in the main menu, click on the “Enable Accessibility Service” switch. You will be taken to the accessibility menu where you will need to enable Parallel Windows for Nougat. A pop-up window will appear telling you what the application will have access to, click OK. Again, just press the back button to return to the main application.

Finally, you need to put “Hotspot Dimensions”. This is the place where the Parallel Windows menu will be shown. By default, it is set to the middle right side of the screen, which is a great place for it. I'll be using this option throughout the tutorial.

This completes the installation of Parallel Windows. You can now use multi-window in Android Nougat.

How to use Parallel Windows

To begin, swipe to the middle from the right side of the screen - in the place we talked about earlier when setting up “Hotspot Dimensions”. The Parallel Windows menu opens.

There are three options here, from top to bottom: open the application menu, launch a multi-window session and an application mirror.

The first option opens the application menu, which is a quick and easy way to open an application. Selecting an application from the application menu will automatically open the application in multi-window mode. It is also worth noting that it will take time to display all installed applications if there are many of them.

The second icon launches the application in multi-window mode. A list of recently opened processes will open and you need to select the application you are interested in at the bottom of the window.

The second option can be used without using Parallel Windows. The third option is the most powerful, it allows you to use the application mirror in multi-window mode. However, it may seem confusing.

To use this feature, you must first run at least one application in windowed mode. Open the Parallel Windows menu and select the bottom option. A pop-up message will appear that will tell you that you need to Select an application to get the mirror.







2024 gtavrl.ru.