1

I am creating an attendance app in which I want to block floating apps (like WhatsApp) to prevent sharing of code, I want to block or detect floating apps. Below I have shared an image of the floating app.

Floating window on my app photo

What I have tried:

  1. Adding setOnFocusChangeListener to my Edittext where code is entered to know if focus goes to another app, But even on changing focus to other apps my setOnFocusChangeListener is not working, Below is the code I used:

     codeView.setOnFocusChangeListener((v, hasFocus) -> {
         if (!hasFocus) {
             checkCurrentRollNoAndRemoveAttendance();
         }
     });
    
  2. how to fix screen overlay detected programmatically

  3. Where to android:filterTouchesWhenObscured?

  4. Android detect or block floating/overlaying apps

  5. Prevent losing focus on EditText when clicking on a button in Android

Sidou Gmr
  • 138
  • 8
User
  • 53
  • 7

0 Answers0