Multi-Window open source code developed based on Android 4.4

Source: Internet
Author: User

Hi, this is a multi-window system developed based on Android 4.4. There are still many shortcomings. Please advise me more. The code is already open-source.



Video address

Source Code address


Done:

1. The APP is displayed in a window

In PhoneWindowManager: layoutWindowLw (), the packageName filter is used to display the specified APP in a non-full screen size. Because an APP usually displays multiple activities in the unit of one task, therefore, the packageName filtering method is used.


2. Multiple apps are in the onResume status at the same time.

Modify the onPause () Notification in AMS. If pkg is specified, pause is not notified. In the future, we need to optimize the activity lifecycle control in AMS.


3. Modify touch region of Window

Modify InputMonitor: addinput?whandlelw () so that the Window intercepts the region of touch event only within the range of this Window.


4. Move the window of Touch to the top layer of the screen

In AMS and WindowSession, an interface is added to intercept touch events in ViewRootImpl, notify WMS through windowSession, and AMS, and move windows and tasks to the top layer.


5. The RecentActivity is started into the APP stack.

The visibility switching during task Switching in the same stack is well controlled, but it is difficult to control cross-stack switching. Therefore, you can move the RecentActivity to the APP stack to start it. In this way, RecentActivity is called out, when switching an APP, no display bugs will appear.


6. Add titlebar to the Window

Add titlebar in PhoneWindow: generateLayout (), including close, minimum, maximum, drag area, and resize.

Minimum has not yet been implemented, because we need to work with AMS to control the activity lifecycle.


7. added the portal APP

You can select an APP to start in a window, and register a Custom service in ServiceManager. The service contains the pkgs to be displayed in a window, which is then called by the framework.


Next plan:

1. Fixed various bugs

There are so many bugs that you can't bear to look straight... The key is that the source code is not familiar enough in many places, so it is always a headache and a headache.


2. Familiar with AMS Control Process

A reasonable multi-window activity lifecycle is designed to complete minimum.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.