1. Check out our companion app, Forums for Android! Download from Google Play

PackageManager not granting permission?

Discussion in 'Application Development' started by v1nsai, May 23, 2010.

  1. v1nsai

    v1nsai Well-Known Member
    Thread Starter

    Mar 24, 2010
    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?


  2. 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