Is it possible to display an item only when the music is playing??

Is it possible to display an item only when the music is playing??

]]>

15 Commentsto Is it possible to display an item only when the music is playing??

  1. Anonymous says:

    < ![CDATA[

    You may be able to with Tasker

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Yeah i already know it, maybe i should specify saing “using only scripts, no third party apps”.


    Thanks anyway for your quick answer 🙂

    ]]>

  3. Anonymous says:

    < ![CDATA[

    TrianguloY Lukas Morawietz ?

    ]]>

  4. Anonymous says:

    < ![CDATA[

    LL.getContext().getSystemService(Context.AUDIO_SERVICE).isMusicActive()

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Lukas Morawietz really thanks you can’t even begin to imagine how it will be useful to me ^^

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Lukas Morawietz another little question, For which event I should set the script?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    You need to regularly check the value using a timer. Initiate the timer in some item resume event, and cancel it in the pause event.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Pierre Hébert I’m not practical with timers, to be honest I’ve never used them xD


    But I have an idea and I want to know if I’m right.



    resume event script:



    var script=LL.getCurrentscript();


    script.setTag(0);


    var tag=script.getTag();



    while(tag==0){


      LL.setTimeout(music(),2000);


    }



    function music(){


      do something…


    }



    paused event script:



    var script=LL.getScriptByName(“resume event script”);


    script.setTag(1);



    Is there a better way or am i totally wrong?

    ]]>

  9. Anonymous says:

    < ![CDATA[

    This is roughly the right thing to do, but use the timer id to cancel it.


    You can find a sample in the clock script which link is at the bottom of http://www.pierrox.net/cmsms/applications/lightning-launcher/scripting.html

    ]]>

  10. Anonymous says:

    < ![CDATA[

    Pierre Hébert thanks ^__^

    ]]>

  11. Anonymous says:

    < ![CDATA[

    I had been pondering a similar idea, except I’d want the icon to also spin like a record while music is playing and then slow down and stop when music stops and then have the icon disappear. That I’m sure is impossible.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    It’s possible, but it needs a bit more work. When detecting a change from inactive to active start a timer loop to slowly animate the rotation. When detecting a change from active to inactive stop the previous timer and start a new one shot animation to end the rotation progressively.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    So you’re saying that we can have spinning icons? Wow I didn’t know that.

    ]]>

  14. Anonymous says:

    < ![CDATA[

    The easiest would be to animate the rotation angle of some item, otherwise it could be possible to use an animated gif and TrianguloY script http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_animated_icons

    ]]>

  15. Anonymous says:

    < ![CDATA[

    I’d like to see someone pull this off hehe

    ]]>

Leave a Reply

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