Mobile QQ backstage clean not off the secret--anddroid suspended window

Source: Internet
Author: User

The question comes from an article: Why does the QQ background of mobile phone not clear out? MIUI Engineer: 1-megapixel page for your entire lives

Out of curiosity, want to know what this pixel in the end is what, with the mobile phone security Butler control QQ suspended window permissions:

Closed QQ suspended window permissions, through the background of a key cleanup, reopen QQ, found to have started from splash;

Open QQ suspended window permission, a key to clean up, open QQ, found that it is directly into the main interface; Note that a key to clean up the QQ, or clean up, QQ has since started.

As for, is not cleaned or self-priming, back to explore, here to talk about this one-pixel suspension window.

        Button button = New button (Getapplicationcontext ());        WindowManager wm = (WindowManager) getapplicationcontext ()                . Getsystemservice (context.window_service);        Windowmanager.layoutparams wmparams = new Windowmanager.layoutparams ();        /**         * The following are windowmanager.layoutparams related properties for specific purposes please refer to the SDK documentation         *        /wmparams.type = Layoutparams.type_phone;// Here is the key, you can also try 2003        Wmparams.format = pixelformat.rgba_8888;//Set the picture format, the effect is transparent background        /**         * The flags here are also critical. The code is actually wmparams.flags |= flag_not_focusable;         * 40 is the origin of the Wmparams default property (+) + flag_not_focusable (8)         */        wmparams.flags = Layoutparams.flag_not_touch_modal                | Layoutparams.flag_not_focusable                | layoutparams.flag_not_touchable;        Wmparams.width = +;        Wmparams.height = +;        Wm.addview (button, wmparams); CREATE view

Add permissions

<uses-permission android:name= "Android.permission.SYSTEM_ALERT_WINDOW"/>

It's just that simple. Adding a hover window will always show the button, regardless of whether you return to launcher or open any application.

QQ of this suspension window is done relatively small, should still be transparent, also will put in pull over or corner, if through this suspended window to ensure QQ always in the background process, take me to explore again.



Mobile QQ backstage clean not off the secret--anddroid suspended window

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.