FORUMS

What Features Do You Look for in a Gallery App?

With so many different options to choose from, finding the right Gallery app may be a … more

Google Photos ‘Unlimited’ Storage Reportedly Being Capped

When Google Photos was announced, many of us thought very highly … more

Sprint Moves to Lift Video Streaming Limit for All-In

Yesterday, Sprint announced a new unlimited scheme that offered customers an … more

Xiaomi Releases Kernel Source Code For Mi4i

If you’ve been following the XDA News Portal lately, you might have noticed an … more

[APP][XPOSED] Wake Gestures v1.2 [07/09/2014]

5,587 posts
Thanks Meter: 15,743
 
Post Reply Subscribe to Thread Email Thread
27th March 2015, 06:40 PM |#281  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by C3C076

This module is incompatible with lollipop. You could try flar2's app instead:
http://forum.xda-developers.com/show....php?t=3030399

Thank you very much, its working perfectly now
 
 
1st April 2015, 06:40 PM |#282  
Mikanoshi's Avatar
Senior Member
Flag Soviet ☭ Russia
Thanks Meter: 3,342
 
Donate to Me
More
Quote:
Originally Posted by C3C076

This module is incompatible with lollipop.

Maybe you know how to check whether music is active or not even if it was paused? isMusicActive() is no longer there in PhoneWindowManager, isMusicActive() from AudioManager returns false after pause.
That old method from PhoneWindowManager was checking some stuff. I tried everything, all returns false, except one method.
I couldn't use mMediaFocusControl.checkUpdateRemoteStateIfActive( 3), because it's in a local var in a service)
The Following User Says Thank You to Mikanoshi For This Useful Post: [ View ]
2nd April 2015, 12:04 PM |#283  
Mikanoshi's Avatar
Senior Member
Flag Soviet ☭ Russia
Thanks Meter: 3,342
 
Donate to Me
More
Quote:
Originally Posted by Mikanoshi

Maybe you know how to check whether music is active or not even if it was paused?

And I answer to myself)
Code:
boolean isStreamActive = (Boolean)XposedHelpers.callStaticMethod(findClass("android.media.AudioSystem", null), "isStreamActive", 3, 10000);
boolean isStreamActiveRemotely = (Boolean)XposedHelpers.callStaticMethod(findClass("android.media.AudioSystem", null), "isStreamActiveRemotely", 3, 10000);
Return true if music playback was active in last 10 seconds (second parameter). There is still some max delay value and it works only for ~10-30 seconds...
Looks like MediaPlayer releases stream after 30 sec on pause (Walkman, for HTC Music it's 60 seconds), so no way to tell if it was paused or stopped.
Last edited by Mikanoshi; 2nd April 2015 at 12:38 PM.
The Following User Says Thank You to Mikanoshi For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes