"Music End" Trigger

Post your questions and help other users.

Moderator: Martin

Post Reply
abuHaafidz
Posts: 7
Joined: 31 Mar 2014 06:05

"Music End" Trigger

Post by abuHaafidz » 31 Mar 2014 06:07

I'm trying to get a trigger to go when I stop my music player from playing in the background (totally ending the task). What trigger should I use? Thanks

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: "Music End" Trigger

Post by ZSasha » 01 Apr 2014 02:58

I asked Martin with a similar question but about "music start". He said he had not found such function in Android API so apart from periodic polling it is impossible.
It may be true for "Music End" as well, sorry.

But let's see what Martin says when he comes back.

abuHaafidz
Posts: 7
Joined: 31 Mar 2014 06:05

Re: "Music End" Trigger

Post by abuHaafidz » 01 Apr 2014 05:28

Hi ZSasha, what I've done so far is the following:-

Code: Select all

Trigger=>    General Broadcast: on android.media.action.CLOSE_AUDIO_EFFECT_CONTROL_SESSION
Although I discovered that it triggers even if the the player is secretly running in the background, it's pretty much good enough for me since I can now click a stop button on my bluetooth headset to trigger it's flow.

I also did find one trigger called "General Broadcast: on android.media.action.OPEN_AUDIO_EFFECT_CONTROL_SESSION"

I haven't tried it yet though. Have you tried it for yourself?

Post Reply