Macros Action to Stop Media Mutes it does not stop it why ?

augustya

Member
Hi Guys,

This is the first time I am using Macrodroid So I just wanted to be sure if I am doing it right. So the first time to set up a macro which would trigger in a particular condition is, Go to create Macro then select a trigger and then choose an action that trigger will perform right ? That’s about it ? That is how you do it? right ? is that correct ?

Secondly one of the use cases that I have is, sadly in a Xiaomi Phone when there is a incoming phone call comes, and if you have any media playing already like a audio or a video it does not get paused or stopped like in iOS. So when creating a Macro I chose a trigger like on incoming call and the action being Pause the media playing, but when I tested it, what the Marco did is just mutes the sound coming from the APP but the application keeps playing. Do you not have a action whereby on incoming call the APP playing the particular Media Audio or Video pauses the media? I tried the action that is available in the Macrodroid app but in that even if I choose stop the media, when a call comes like when a even is triggered it just mutes the audio but does not pauses the audio or video. Don’t you have any such action which can pauses the media when a call comes in ?

Can someone please tell me about this ?

TIA !
 

Dm114

Well-known member
Hi Guys,

This is the first time I am using Macrodroid So I just wanted to be sure if I am doing it right. So the first time to set up a macro which would trigger in a particular condition is, Go to create Macro then select a trigger and then choose an action that trigger will perform right ? That’s about it ? That is how you do it? right ? is that correct ?

Secondly one of the use cases that I have is, sadly in a Xiaomi Phone when there is a incoming phone call comes, and if you have any media playing already like a audio or a video it does not get paused or stopped like in iOS. So when creating a Macro I chose a trigger like on incoming call and the action being Pause the media playing, but when I tested it, what the Marco did is just mutes the sound coming from the APP but the application keeps playing. Do you not have a action whereby on incoming call the APP playing the particular Media Audio or Video pauses the media? I tried the action that is available in the Macrodroid app but in that even if I choose stop the media, when a call comes like when a even is triggered it just mutes the audio but does not pauses the audio or video. Don’t you have any such action which can pauses the media when a call comes in ?

Can someone please tell me about this ?

TIA !
For the 1st part of your question, you're right. Have a look to MacroDroid Wiki and you'll probably find some other answers...

According to the 2nd part of your question, @Jacob L and I both tried to give you an answer in your recent post.
 

tanutanu

Well-known member
T: Call Incoming
A: Control Media

The Control Media action has 3 options. Try Default Player option when Simulate Media Button is NOT working. You have to set default apps though.
 

Attachments

  • IMG_20210927_225929.jpg
    IMG_20210927_225929.jpg
    119.3 KB · Views: 8

augustya

Member
T: Call Incoming
A: Control Media

The Control Media action has 3 options. Try Default Player option when Simulate Media Button is NOT working. You have to set default apps though.
Default APPS ? is this in The Macrodroid APP or my device ?
 

augustya

Member
Your device. Check it out on your OS settings App, App -> Manage Apps -> Default apps(upper right corner ... menu).
Thanks for mentioning the path. Yes I checked it is already set to default. And I checked again for the Macro with Action Pause Music, The media gets muted but the media keeps playing.
 

tanutanu

Well-known member
Thanks for mentioning the path. Yes I checked it is already set to default. And I checked again for the Macro with Action Pause Music, The media gets muted but the media keeps playing.
I tested on my Xiaomi MIUI12 Android11 device right now. It worked correctly. You might need to turn on your device screen when it turned off.
 

Attachments

  • IMG_20210927_234504.jpg
    IMG_20210927_234504.jpg
    129.7 KB · Views: 15
  • IMG_20210927_233939.jpg
    IMG_20210927_233939.jpg
    103.9 KB · Views: 15
  • IMG_20210927_234009.jpg
    IMG_20210927_234009.jpg
    119 KB · Views: 15

augustya

Member
I tested on my Xiaomi MIUI12 Android11 device right now. It worked correctly. You might need to turn on your device screen when it turned off.
I will show what Condition I have kept in the Macros, check these screenshots.
 

Attachments

  • Screenshot_2021-09-27-20-40-06-016_com.arlosoft.macrodroid.jpg
    Screenshot_2021-09-27-20-40-06-016_com.arlosoft.macrodroid.jpg
    269.4 KB · Views: 11
  • Screenshot_2021-09-27-20-40-13-197_com.arlosoft.macrodroid.jpg
    Screenshot_2021-09-27-20-40-13-197_com.arlosoft.macrodroid.jpg
    268.3 KB · Views: 10

tanutanu

Well-known member
Try another option same as I do if not working now. You have to make the player foreground when you use Simulate Media Button option. If not sure which player, you can memorize the app name in a global variable when you start music(or video).
 

augustya

Member
Try another option same as I do if not working now.
You mean "Launch Application" in the Action ? That thing ?

You have to make the player foreground when you use Simulate Media Button option.
Player Foreground as in ? did not understand ?

If not sure which player, you can memorize the app name in a global variable when you start music(or video).
Global Variable ? where it is ?
 

tanutanu

Well-known member
You mean "Launch Application" in the Action ? That thing ?


Player Foreground as in ? did not understand ?


Global Variable ? where it is ?
Do once exactly same as my attached picture om #7 with your preferred music player. While making the macro, MD shows you to make the app foreground before the pause action emulate your device media button.
After it works correctly, I will explain how to identity the current foreground player.
 

augustya

Member
Ok so when I go to Trigger select incoming call then go to action and go to Launch Application (Just like you did) It is giving me these screenshots but I want to select application as Soundcloud (Just like you have selected (Amazon Music) but when I tell show system it does not even show me Soundcloud from the list of available applications.
 

Attachments

  • Screenshot_2021-09-27-22-20-32-565_com.arlosoft.macrodroid.jpg
    Screenshot_2021-09-27-22-20-32-565_com.arlosoft.macrodroid.jpg
    291.2 KB · Views: 5
  • Screenshot_2021-09-27-22-20-02-424_com.arlosoft.macrodroid.jpg
    Screenshot_2021-09-27-22-20-02-424_com.arlosoft.macrodroid.jpg
    361.2 KB · Views: 6

tanutanu

Well-known member
Ok so when I go to Trigger select incoming call then go to action and go to Launch Application (Just like you did) It is giving me these screenshots but I want to select application as Soundcloud (Just like you have selected (Amazon Music) but when I tell show system it does not even show me Soundcloud from the list of available applications.
You can swipe the app list or type a part of the app name on the top search window.
 

Attachments

  • IMG_20210928_020230.jpg
    IMG_20210928_020230.jpg
    116.4 KB · Views: 3
  • IMG_20210928_020414.jpg
    IMG_20210928_020414.jpg
    255.5 KB · Views: 4

augustya

Member
Do once exactly same as my attached picture om #7 with your preferred music player. While making the macro, MD shows you to make the app foreground before the pause action emulate your device media button.
After it works correctly, I will explain how to identity the current foreground player.
Ok an update : now so when I did what you had selected in your screenshot in Post #7 I wanted to select some other APP for e.g. like Soundcloud but since it was not showing in the available list of apps I selected other app in this case Apple Music. And yes now it Pauses the Music playing in Apple Music. But when I replicated the same Macros with the only change End Call>Launch APP> Apple Music> Play Music on doing this even my first Macros is performing something else which is instead of Pausing the Music it mutes it. So If I have end call macro also then it mutes but if I only have the Pause Music Macros it pauses the Music. why so ?
 

tanutanu

Well-known member
Yes Thanks Got It ! This works ! But please read my post #14.
sounds good it works correctly.
Now you modified the macro when hanged up the calk, right?
It is the almost same thing. If not working correctly, add few seconds wait like attached images.
 

Attachments

  • IMG_20210928_022025.jpg
    IMG_20210928_022025.jpg
    140.9 KB · Views: 7
  • IMG_20210928_022102.jpg
    IMG_20210928_022102.jpg
    132.9 KB · Views: 7

tanutanu

Well-known member
For another player, you can modify both macro like that. Unfortunately, Control Media Action can't take the variable as player name, so you have to add play/pause statements with the constraints.
I didn't check the default player option coz I believed you told it didn't work. If misunderstanding, default player options should be easier.
 

Attachments

  • IMG_20210928_024021.jpg
    IMG_20210928_024021.jpg
    239.8 KB · Views: 7
  • IMG_20210928_023800.jpg
    IMG_20210928_023800.jpg
    328.2 KB · Views: 7
  • IMG_20210928_024044.jpg
    IMG_20210928_024044.jpg
    282.3 KB · Views: 5
  • IMG_20210928_024108.jpg
    IMG_20210928_024108.jpg
    119.1 KB · Views: 6

tanutanu

Well-known member
Do it by yourself like above thing before asking like spinal reflex. I understand you are newbie and we have differences of culture though. It's much faster than waiting a someone's response. Doing as many as possible should be good practice to learn MD basic.
 
Top