FORUMS

Xiaomi Mi Note Pro With SD-810 Goes On Sale In China

The Xiaomi Mi Note Pro, announced on 15th Jan 2015, is Xiaomi’s attempt at … more

Project Fi Invites Are Rolling Out

Google is now sending out the first wave of invites to its new wireless service, Project Fi. … more

Vinsic 20,000mAh Ultra Slim Power Bank Giveaway

We have covered a lot of Android Accessories here on XDA TV. Mostly because we realize … more

T-Mobile Steps Up The War Against Verizon

T-Mobile has today launched a new attack on Verizon under the tagline of “Never Settle … more
Post Reply Subscribe to Thread Email Thread

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

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,072
 
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,072
 
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