FORUMS

Android M Preview Images – XDA TV

Android M preview images are available. That and much more news is covered by Jordan when he … more

I/O Summary: How Android M Handles Power And Charging

In the spirit of improving the core Android experience, Google is changing Android … more

I/O Summary: Google Photos App

At I/O 2015, Google tackled the information problem in mobile once more, this time through … more

I/O Summary: Development, Play Store, The Next Billion

VP of Engineering Jen Fitzpatrick began talking about what Google is doing to … more

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

Thanks Meter: 15,023
 
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,160
 
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,160
 
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