0

I was wondering if it was possible to remove a floating View using TYPE_SYSTEM_OVERLAY used by another App (I'm thinking about Facebook Messenger among others).

I firstly tried to display my own overlay with transluscent background, thinking that it would probably take the other app's place... but sadly the 2 are coexisting (it's interesting to see that many apps can bring their view to the "top most" level).

So at the end: is there any way to get rid of those views ? (I'm working on an app that will allow users to enable a kind of no-distraction mode) - or do we have to live with it ?

JBA
  • 2,889
  • 1
  • 21
  • 38
  • "is there any way to get rid of those views ?" -- I hope not. While I hate such overlays, I hate the concept of one app messing with another apps views even more. Particularly on Android 6.0+, the user can disable such overlays. – CommonsWare Feb 25 '16 at 14:43
  • I understand your point on a general purpose. But please consider that some specific App, chosen and bought by the phone owner, could possibly make an honest, cautious, and user-friendly use of such a feature... On another note, keep in mind that the type_system overlay is by definition _already_ messing with other apps views: a way to keep all of them quiet for a specific amount of time could really be useful is some circumstances. And going each time to uncheck, then recheck all the deeply hidden settings, app per app, is a no-go for most users... Anyway... – JBA Feb 26 '16 at 07:03
  • "On another note, keep in mind that the type_system overlay is by definition already messing with other apps views" -- no, it is not. You can argue that it is interfering with another app's UI. However, it is not changing anything about the `View` objects that the other app has registered with its `Window`, whether via an activity, dialog, or other means. "And going each time to uncheck, then recheck all the deeply hidden settings, app per app, is a no-go for most users" -- in Android 6.0+, this is collected in one place in Settings. – CommonsWare Feb 26 '16 at 12:13
  • Was you able to find anything for this? I am looking for something same but cannot find a solution – Fahid Nadeem Jun 25 '18 at 08:00

0 Answers0