1

I'm trying to create an overlay window to record tapping in my service, but I cannot start the app. I followed this link: Unable to add window android.view.ViewRoot$W@44da9bc0 -- permission denied for this window type.

Basically I asked permission from the phone:

 Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
                    Uri.parse("package:" + getPackageName()));

However my phone tells me: Permission Denial: getCurrentUser() from pid=10296, uid=5010 requires android.permission.INTERACT_ACROSS_USERS

I searched around for this error and added "permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" android:protectionLevel="signature"" to my manifest, but I'm getting the following message and the app still doesn't run:

W/PackageManager: Package com.example.ashoklab2016.project1 attempting to redeclare system permission android.permission.INTERACT_ACROSS_USERS_FULL; ignoring new declaration

May I get some suggestions about where I should preceed? Thanks!

Community
  • 1
  • 1
  • 1
    You cannot hold `INTERACT_ACROSS_USERS_FULL`, unless your app is part of the firmware, and you cannot redefine `INTERACT_ACROSS_USERS_FULL` yourself to try to trick Android into allowing you to hold that permission. "May I get some suggestions about where I should preceed?" -- you might provide a [mcve] of the code that is triggering the exception, along with the full stack trace for the exception. – CommonsWare Oct 29 '16 at 19:29

0 Answers0