I am developing an Android application using Flutter.
I am facing an issue where the application works correctly in debug mode, but when I generate a signed release APK and install it on my Android device, Google Play Protect blocks the application and displays a security warning.
Tested the application in debug mode: Works correctly.
Generated a signed release APK.
Installed the release APK on a Samsung Android device.
Tested Notification Listener Access permission.
Verified that the application works as expected in debug mode.
Framework: Flutter
Platform: Android
Permission used: Notification Listener Access
Build type: Signed Release APK
Installation method: APK (sideloading)
Why does Google Play Protect block the release APK while allowing the debug build to work?
Could Notification Listener Access trigger this warning?
Could code obfuscation, release signing, or Android permissions cause this issue?
How can I identify which component is triggering Play Protect?
Is there a recommended way to resolve this without removing Notification Listener functionality?
I would appreciate any technical guidance or suggestions from developers who have experienced a similar issue.
This isn't debug vs. release. In some countries, Play Protect automatically blocks installing an app from an internet sideloading source (a browser, file manager, etc.) if it declares one of four sensitive permissions, and BIND_NOTIFICATION_LISTERNER_SERVICE is one of them (https://developers.google.com/android/play-protect/warning-dev-guidance).
flutter run installs the debug build over adb, which isn't one of those sources but opening it from a file manager is.
So try installing the release build the same way. adb install build/app/outputs/flutter-apk/app-release.apk. And for real users, distribute it through Google Play.
If you think the block is a mistake, you can appeal here(https://support.google.com/googleplay/android-developer/contact/protectappeals)
To read more on this
https://developers.google.com/android/play-protect/warning-dev-guidance
https://9to5google.com/2024/02/06/play-protect-financial-fraud-pilot/
https://techcrunch.com/2024/10/03/google-pilots-blocking-some-sideloaded-apps-in-india
Emmanuel Obiechina Ikenna