PackageManager not granting permission?


Last Updated:

  1. v1nsai

    v1nsai Well-Known Member This Topic's Starter

    Joined:
    Mar 24, 2010
    Messages:
    60
    Likes Received:
    3
    I'm writing a quick app that sends my phone into sleep when I turn the screen off, according to Spare Parts my phone has been awake more than 2x as long as the screen has actually been on >.<

    It isn't working because PackageManager isn't letting me use the permission, it outputs
    Code (Text):
    1. PackageManager: Not granting permission android.permission.DEVICE_POWER to package com.v1nsai.dataoff (protectionLevel=2 flags=0x44)
    Is there a way to get this to run on a non-rooted phone?
     

    Advertisement
  2. IanGClifton

    IanGClifton Well-Known Member

    Joined:
    Feb 7, 2010
    Messages:
    111
    Likes Received:
    19
    To clarify, you're requesting the android.permission.DEVICE_POWER permission in your manifest and it's not allowing you to use it? If that's the case, I'm not sure if you can do anything about it on a non-rooted phone.
     

Share This Page

Loading...