i want to change the “DiSPLAY TIMEOUT”  from scripting.

i want to change the “DiSPLAY TIMEOUT”  from scripting. I found that it should work with somethinthing like “android.provider.Settings.System.putInt(getContentResolver(),

            Settings.System.SCREEN_OFF_TIMEOUT, time);”

how should be done in LL

]]>

11 Commentsto i want to change the “DiSPLAY TIMEOUT”  from scripting.

  1. Anonymous says:

    < ![CDATA[

    If you have Tasker you can invoke Tasker action from LL!



    Here is a little working script :



    // Change Display Timeout using Tasker from LL



    var dispTimeout = {


    secs: 42,


    mins: 0,


    hours: 0,


    }


    var synchronous = true



    var ti = new TaskerIntent()



    ti.addAction(ActionCodes.SCREEN_OFF_TIMEOUT)


    ti.addArg(dispTimeout.secs)


    ti.addArg(dispTimeout.mins)


    ti.addArg(dispTimeout.hours)



    LL.sendTaskerIntent(ti, synchronous)



    Android.makeNewToast(“Display Timeout set to ” + dispTimeout.secs + “s ” + dispTimeout.mins + “m ” + dispTimeout.hours + “h”, true).show()

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Unforteunately i don’t have Tasker. I hate it’s GUI.



    LL has no class to change Settings by itself?

    ]]>

  3. Anonymous says:

    < ![CDATA[

    LL can invoke Java directly. Try something like LL.bindClass(“android.provider.Settings”);


    Settings.System.putInt(LL.getContext().getContentResolver(),Settings.System.SCREEN_OFF_TIMEOUT, time);

    ]]>

  4. Anonymous says:

    < ![CDATA[

    Roberto Brunelli​ LL only, there is another solution here!

    ]]>

  5. Anonymous says:

    < ![CDATA[

    I just tested it and noticed it requires WRITE_SETTINGS permissions, which you can currently only get through my module https://play.google.com/store/apps/details?id=com.faendir.lightning_launcher.permission_manager. This requires root though.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    You can also install the package found at http://www.lightninglauncher.com/permissions/

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Pierre Hébert oh great, I didn’t know there was one for settings too.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    It’s a recent one (and a coincidence!)

    ]]>

  9. Anonymous says:

    < ![CDATA[

    that sounds great.


    I should be able to do it.



    Isn’t it possible to grant the permission in a scpt like:



    su pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS pm grant com.asksven.betterbatterystats android.permission.DUMP



    I should only change the appname and the permission. Example for bbs found in the net.


     

    ]]>

  10. Anonymous says:

    < ![CDATA[

    That might as well work.

    ]]>

  11. Anonymous says:

    < ![CDATA[

    thanks i will tell you when i will success

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *