-2

Am new to android studios as per my requirements I need to show static view enter image description here(Equal to flash screen) when goes to background state ex: recent used apps screen

For Ex: in the attached image for Paytm application we can able see data but PayPal application not allowing to see the data(Please refer attached image). I want Paypal type blur effect.

  • What you need to annoy your users for? – Marcin Orlowski May 06 '19 at 07:53
  • Possible duplicate of [How do I prevent Android taking a screenshot when my app goes to the background?](https://stackoverflow.com/questions/9822076/how-do-i-prevent-android-taking-a-screenshot-when-my-app-goes-to-the-background) – ADM May 06 '19 at 08:18
  • You can not show any screen or dialog . What you can do is in above link .. – ADM May 06 '19 at 08:18

1 Answers1

0

First of all, I hope you're doing it with good intentions and not to annoy users. Second, you can implement Application.ActivityLifecycleCallbacks interface to monitor which Activities are going to foreground and background by monitoring onStart and onStop callbacks. If there are more activities in background than in foregroung you can assume that the whole app is in background.

You can take some inspiration from here:

https://github.com/wusadurski/return-to-main-screen/blob/master/app/src/main/java/com/wsadurski/returntomainscreen/util/ResumedActivityGetterImpl.kt