FORUMS

PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, … more

XDA Picks: Best Apps of the Week (July 25 – Aug 1)

Apps are at the front and center of any smartphone experience, and with over a … more

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

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

5,614 posts
Thanks Meter: 15,866
 
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,507
 
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,507
 
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