Send an Intent
Moderator: Gurus
Send an Intent
What would be the command/extras for sending an intent for media monkey to start playing music or to play a certain song?
Re: Send an Intent
Hi,
check these commands http://www.mediamonkey.com/support/inde ... ediamonkey you can also access/command thru scripting
check these commands http://www.mediamonkey.com/support/inde ... ediamonkey you can also access/command thru scripting
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
How to attach PICTURE/SCREENSHOTS to forum posts
Re: Send an Intent
I believe those commands are only for the windows version?Peke wrote: ↑Sat Jul 07, 2018 5:21 am Hi,
check these commands http://www.mediamonkey.com/support/inde ... ediamonkey you can also access/command thru scripting
-
- Posts: 241
- Joined: Thu Nov 14, 2013 5:23 pm
Re: Send an Intent
You are right, intents for Android version are described here: https://www.mediamonkey.com/wiki/index. ... d_dev_docs
Re: Send an Intent
That is what I was looking for. Thanks!
Now as for how to utilize it, I can get the sync to start by creating this intent in tasker:
But I cannot figure out how to use "com.ventismedia.android.mediamonkey.ACTION_MEDIA_BUTTON". Any tips? I'm likely using the extras wrong.
Now as for how to utilize it, I can get the sync to start by creating this intent in tasker:
Code: Select all
Send Intent [
Action: com.ventismedia.android.mediamonkey.ACTION_START_SYNCHRONIZATION
Cat: None
Mime Type:
Data:
Extra:
Extra:
Package:
Class:
Target: Broadcast Receiver
]
-
- Posts: 241
- Joined: Thu Nov 14, 2013 5:23 pm
Re: Send an Intent
You have to put extra "KeyEvent" object as an instance of android.view.KeyEvent class,
what tasker app are you using? Are you able to add such an object?
The KeyEvent object must have to set action as KeyEvent.ACTION_DOWN AND KeyCode according to what you want to do,
supported key codes:
KeyEvent.KEYCODE_HEADSETHOOK
KeyEvent.KEYCODE_MEDIA_PLAY
KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE
KeyEvent.KEYCODE_MEDIA_PAUSE
KeyEvent.KEYCODE_MEDIA_NEXT
KeyEvent.KEYCODE_MEDIA_PREVIOUS
KeyEvent.KEYCODE_MEDIA_FAST_FORWARD
KeyEvent.KEYCODE_MEDIA_REWIND
KeyEvent.KEYCODE_MEDIA_STOP
what tasker app are you using? Are you able to add such an object?
The KeyEvent object must have to set action as KeyEvent.ACTION_DOWN AND KeyCode according to what you want to do,
supported key codes:
KeyEvent.KEYCODE_HEADSETHOOK
KeyEvent.KEYCODE_MEDIA_PLAY
KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE
KeyEvent.KEYCODE_MEDIA_PAUSE
KeyEvent.KEYCODE_MEDIA_NEXT
KeyEvent.KEYCODE_MEDIA_PREVIOUS
KeyEvent.KEYCODE_MEDIA_FAST_FORWARD
KeyEvent.KEYCODE_MEDIA_REWIND
KeyEvent.KEYCODE_MEDIA_STOP
Re: Send an Intent
I figured out how to send an intent using java following the example on the wiki page. It works fine but if I change "android.intent.action.MEDIA_BUTTON" to "com.ventismedia.android.mediamonkey.ACTION_MEDIA_BUTTON" it does not work anymore. I attached pictures of my tasker function.
If I delete function 4 it will pause/play the currently running media player including mediamonkey. If I delete function 4 nothing happens.
If I delete function 4 it will pause/play the currently running media player including mediamonkey. If I delete function 4 nothing happens.
-
- Posts: 241
- Joined: Thu Nov 14, 2013 5:23 pm
Re: Send an Intent
There was a regression and "com.ventismedia.android.mediamonkey.ACTION_MEDIA_BUTTON" does not work correctly (fixed in next build),
but a better way to achieve this goal in "Tasker" is via Action from Category "Media"/"Media Control" and you can specify command and app. Did you try it?
but a better way to achieve this goal in "Tasker" is via Action from Category "Media"/"Media Control" and you can specify command and app. Did you try it?
Re: Send an Intent
I did not try that but it would have saved me A LOT of time haha. Thanks for the info on the regression!martin.bohac wrote: ↑Wed Jul 11, 2018 1:05 pm There was a regression and "com.ventismedia.android.mediamonkey.ACTION_MEDIA_BUTTON" does not work correctly (fixed in next build),
but a better way to achieve this goal in "Tasker" is via Action from Category "Media"/"Media Control" and you can specify command and app. Did you try it?