Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Android suspension window does not need to apply for permission dynamically

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you about the Android suspension window without dynamic application for permission. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

A few days ago, I just wrote an article on "Android to achieve removable suspension windows". I need to add permission application in AndroidManifest.xml.

And this permission needs to be dynamically applied for after android6.0, and added to app, the program will let you pop up the permission to open the upper window, which is a bit unfriendly.

The APP of decompiling UC finds this method step by step. I don't know much about decompilation, so I won't go into details. Let's focus on the following:

There is this first paragraph in the article.

That is to say, the type in the WindowManager.LayoutParams parameter of the suspension window, when we set its value to TYPE_TOAST, we do not need to apply for permission through android, but in the version below api19, that is, android4.3 and below, if you use the TYPE_TOAST suspension window to display normally, but can not accept the touch event.

So the final treatment is when the api of android

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report