[Release][PX3|PX5] MtcdTools-Control music players, customize buttons, voice control

Search This thread

f1x

Senior Member
Jul 27, 2016
308
254
Warsaw
Hello,
Today is time to release second application with more powerful features on-board. I would like to introduce MtcdTools.

MtcdTools

https://xdaforums.com/android-auto/...ent/howto-beginners-guide-to-setting-t3595793

21.06.2017: Version 1.9 has been released
19.06.2017: Version 1.8 has been released
10.05.2017: Version 1.7 has been released
09.05.2017: Version 1.6.1 has been released
02.03.2017: Version 1.6 has been released
27.02.2017: Version 1.5 has been released
23.02.2017: Version 1.4 has been released
14.02.2017: Version 1.3.3 has been released
13.02.2017: Version 1.3.2 has been released
10.02.2017: Version 1.3.1 has been released
07.02.2017: Version 1.3 has been released
19.08.2016: Version 1.2 has been released
14.08.2016: Version 1.1 has been released
10.08.2016: Version 1.0 has been released

If you enjoyed using of the application, you can support my work and Donate to me :eek:.

Best regards,
f1x
 
Last edited:

j2gifted

Senior Member
Mar 19, 2013
191
5
Should I delete your other Spotify control to use this?

Sent from my SGH-M919 using Tapatalk
 

f1x

Senior Member
Jul 27, 2016
308
254
Warsaw
Tried it, does not work with my music app named doubleTwist

Hi,
I tested it a minute ago on my device and it works for me (I listened to mp3 files on my SD card using doubleTwist). Have you bound key codes to NEXT/PREV/TOGGLE PLAY actions? Could you please provide a screenshot of "Edit existing bindings" screen?
 

Dec64

Senior Member
Jul 20, 2016
111
25
Works perfectly for me on Spotify. I notice you called it MTCD tools rather then Music Player tools or similar? Do you have aspirations for it beyond just music?

If so I was wondering if the launch function could be expanded to support intents. For example I use AutoMate Dashboard which has different menus so to flick over to maps screen rather then maps I would need to use an intent.

com.bitspice.automate.EXIT_APP = Exit the app
com.bitspice.automate.MAP_SCREEN = Launch the maps screen
com.bitspice.automate.PHONE_SCREEN = Launch the phone screen
com.bitspice.automate.HOME_SCREEN = Launch the home screen
com.bitspice.automate.MUSIC_SCREEN = Launch the music screen
com.bitspice.automate.SHORTCUT_SCREEN = Launch the shortcut screen
com.bitspice.automate.VOICE_SCREEN = Launch the voice input screen
 
  • Like
Reactions: Oblivious_89

sterod

Senior Member
Aug 27, 2012
394
110
Toronto
I'll try with an mp3 shortly but I was trying the radio streaming feature in doubleTwist, when in that mode, the on screen back button rewinds, which may not be the same as the "previous" button intent your app sends.
 

sterod

Senior Member
Aug 27, 2012
394
110
Toronto
I just tried with MP3's in doubleTwist - still not working. I only have two bindings for steering wheel control buttons.
NEXT - 300
PREV - 299
 

f1x

Senior Member
Jul 27, 2016
308
254
Warsaw
I just tried with MP3's in doubleTwist - still not working. I only have two bindings for steering wheel control buttons.
NEXT - 300
PREV - 299

I have checked the radio streaming and it works as you mentioned - next/prev on the screen has 'seeking' behavior. I will try to simulate these buttons in my app and check again.

Btw. In doubleTwist player settings I see something like 'steering using headphones' (I have Polish language set and it is 1:1 translation). Try to switch it on/off and check in case of mp3 playback steering.
 

sterod

Senior Member
Aug 27, 2012
394
110
Toronto
I have checked the radio streaming and it works as you mentioned - next/prev on the screen has 'seeking' behavior. I will try to simulate these buttons in my app and check again.

Btw. In doubleTwist player settings I see something like 'steering using headphones' (I have Polish language set and it is 1:1 translation). Try to switch it on/off and check in case of mp3 playback steering.
Yes the setting is called "Headset/Car Controls" and it's inside categories / player settings, however toggling it on or off makes no difference. Unfortunately it still won't work.
 
  • Like
Reactions: Oblivious_89

Dec64

Senior Member
Jul 20, 2016
111
25
Can confirm "Radioplayer - Free UK Radio" works as well, skips between radio stations fine.
 

DanB0y

Senior Member
Jul 20, 2016
104
27
Montreal
I can confirm that it works great with the Neutron app..

BUT...

I need to open the MTCD tools each time I use the head unit or else it wont work.
 

DanB0y

Senior Member
Jul 20, 2016
104
27
Montreal
You mean it does not start automatically after boot up? Is your device completely shutdown or just sleep?
I think its both on sleep and shutdown.

Unit is MTCD_KD if that helps

---------- Post added at 05:28 AM ---------- Previous post was at 05:26 AM ----------

I think its both on sleep and shutdown.

Unit is MTCD_KD if that helps
If start my car, play music in Neutron and open the MTCDtolls app and go back to the already running Neutron app, it works, so I still enjoy your work :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    Hello,
    Today is time to release second application with more powerful features on-board. I would like to introduce MtcdTools.

    MtcdTools

    https://xdaforums.com/android-auto/...ent/howto-beginners-guide-to-setting-t3595793

    21.06.2017: Version 1.9 has been released
    19.06.2017: Version 1.8 has been released
    10.05.2017: Version 1.7 has been released
    09.05.2017: Version 1.6.1 has been released
    02.03.2017: Version 1.6 has been released
    27.02.2017: Version 1.5 has been released
    23.02.2017: Version 1.4 has been released
    14.02.2017: Version 1.3.3 has been released
    13.02.2017: Version 1.3.2 has been released
    10.02.2017: Version 1.3.1 has been released
    07.02.2017: Version 1.3 has been released
    19.08.2016: Version 1.2 has been released
    14.08.2016: Version 1.1 has been released
    10.08.2016: Version 1.0 has been released

    If you enjoyed using of the application, you can support my work and Donate to me :eek:.

    Best regards,
    f1x
    9
    I rebuild the App with some changes, because the v1.9 is almost outdated. :)

    Changes:
    -Update Gradle to latest
    -Update dependencies to latest
    -Migrate Android library to latest AndroidX
    -Android 10 Support (API 29)
    -Add Day/Night support
    -Add german language
    -Add navigationbar color
    -Add one more permission
    -Fix some outdated stuff
    -Reworked Mainscreen
    -Changed statusbar + accent color
    -Reduce 50% of app size (884kb only)
    -Remove Notifications
    -Remove unneeded dependencies
    -New Launcher Icon
    -Renamed the App to MTCE Tools
    -Changed Min API from 19 to 21
    -Fixed typos
    -Removed unneeded beep sound.
    -Removed notification icons

    Screenshot + Download are Attached :)
    6
    Okay guys, we collected money needed for the PX5 board :). I ordered the board from Bob last week just to not waste the time for the shipping. According to the tracking info, the parcel is in the way to Poland :). I will start the R&D as soon as board arrives.

    The hall of fame:
    @Nomader0
    @zapedge
    @Migz93
    @bm282
    @almera020
    @SomebodySysop
    @apollo1976
    @Kalti94
    @stinger4321

    Many thanks from me and from our community, guys :). Stay tuned.
    5
    I rebuild the App with some changes, because the v1.9 is almost outdated. :)

    Changes:
    -Update Gradle to latest
    -Update dependencies to latest
    -Migrate Android library to latest AndroidX
    -Android 10 Support (API 29)
    -Add Day/Night support
    -Add german language
    -Add navigationbar color
    -Add one more permission
    -Fix some outdated stuff
    -Reworked Mainscreen
    -Changed statusbar + accent color
    -Reduce 50% of app size (884kb only)
    -Remove Notifications
    -Remove unneeded dependencies
    -New Launcher Icon
    -Renamed the App to MTCE Tools
    -Changed Min API from 19 to 21
    -Fixed typos
    -Removed unneeded beep sound.
    -Removed notification icons

    Screenshot + Download are Attached :)

    Could you please create a pull request to the original github repository?
    3
    MtcdTools 1.3 RC1

    Hello. After over one month of intensive development, it is time to release new version of MtcdTools. Version is a Release Candidate, so still few bugs or improvements are possible to find. Report them in this topic or on the GitHub page of the project. If you enjoyed - you can donate to me :).

    It is recommended to uninstall old version before installing a new one.

    Download link: https://github.com/f1xpl/MtcdTools/releases

    Below you can find a description of new features.

    Actions oriented model
    Any object which you define must have a unique name. It is used as an identifier, e.g. in voice control or action lists.​

    Actions
    Key action
    Use this action to simulate a press of android media key (e.g. play, next, pause). As of version 1.3 new media keys like REWIND and FORWARD were added. Unfortunately, most of music players do not support them, but maybe your favorite player will be able to handle it - just check.

    Supported media key events:
    KEYCODE_MEDIA_FAST_FORWARD
    KEYCODE_MEDIA_NEXT
    KEYCODE_MEDIA_PAUSE
    KEYCODE_MEDIA_PLAY
    KEYCODE_MEDIA_PLAY_PAUSE
    KEYCODE_MEDIA_PREVIOUS
    KEYCODE_MEDIA_REWIND
    KEYCODE_MEDIA_STOP​


    Launch action
    Use this action to launch an application installed on the system.​


    Start activity action
    Feature added in version 1.3. Similar feature is available in Tasker. It is useful to launch an application in a non standard way, e.g. displays specific activity accordingly to provided data URI. More information how to deal with intent are available on Android Developer site https://developer.android.com/reference/android/content/Intent.html.

    Useful intents that I discovered:

    Display your Spotify's "starred" songs:
    Intent action: android.intent.action.VIEW
    Intent Data: spotify:collection:tracks
    Intent Flags: 268435456​

    Launch Google Maps in "driving mode":
    Intent action: android.intent.action.VIEW
    Intent Data: google.navigation:/?free=1&mode=d&entry=fnls
    Intent Flags: 268435456​



    Broadcast intent action
    Feature added in version 1.3. Similar feature is available in Tasker. Use this action to broadcast an intent through the system. Some applications are using this mechanism to communicate with other apps. E.g. MTC devices are using this mechanism to notify about key press. More information how to deal with broadcast are available on Android Developer site https://developer.android.com/guide/components/broadcasts.html.​


    Actions sequences
    Feature added in version 1.3. Use it to group defined actions in sequences. Actions are stored and executed in order of addition. Useful to simulate "mode" functionality and automate playback.

    Example:
    Let's assume you defined actions "stop", "play", "my music player" and "my podcast player". Now you want to switch between your players and start playback automatically. Just declare two sequences with actions in a specific order:

    [Sequence 1]
    Stop // it should stop any active playback
    My music player // it will launch your music player
    Play // it will trigger playback of you music player launched in previous step.​

    [Sequence 2]
    Stop // it should stop any active playback
    My podcast player // it will launch your podcast player
    Play // it will trigger playback of you podcast player launched in previous step.​

    Then you can bind your action sequences with key sequence or add it to actions list and automate playback of your music players.​


    Actions list
    Feature added in version 1.3, replaces "Mode" functionality from version 1.2. Use this feature to group your actions and action sequences. You can define key sequence (I prefer to use knob) to scroll the list up and down. In settings you can set time after which highlighted item is executed. This feature is more powerful than regular "mode" because you can fully control what will be launched. You do not need to stick to the defined "mode" order and harm your devices by launching of unnecessary applications.​


    Keys sequences
    As of version 1.3 you are able to bind your defined objects (actions, action sequences, action lists) not only to single key but also to keys sequence. It means you can press any variation of hard keys (device keys and steering wheel keys) to execute your defined action.​


    Voice control
    MtcdTools 1.3 brings possibility to control your device using voice. You can say your defined actions or action sequences names and MtcdTools will execute it for you with provided order. It is possible to execute a single action or action sequence or mix them together using "concatenation word" that you can define in Settings. Concatenation is actually unlimited. You can mix actions with actions sequences and execute as many you want. Voice control is localized. Input language corresponds to the language which is set on your device. If "Google Now" supports you language, then MtcdTools will support it as well.

    To use Voice control you have to define "start activity" action with below parameters and bind it with any keys sequence:
    Class name: com.f1x.mtcdtools.activities.VoiceDispatchActivity
    Intent package: com.f1x.mtcdtools
    Flags: 813760516​

    Example:
    Let's assume you defined 2 actions called "My Music Player" and "Play". Also, you set your "concatenation word" to "then". You can say to device "My music player then play". It will trigger execution of "My music player" and "play" actions one by one.​


    Settings
    Delay of execution action from the list - define time after which highlighted item from actions list is executed.

    Voice command execution delay - define time after which MtcdTools will start processing of the provided input (actions names, etc.). A parameter has been introduced due to poor performance of our devices. It is helpful when you want to execute an playback control action ("play", "pause", etc.). "Google Now" activity will interrupt playback during speech recognition and needs some time to resume it. Sometimes it can interfere with playback control actions.

    Key press speed - define how long MtcdTools will wait to collect next key press to sequence.

    Delay of execution action from sequence - Parameter has been introduced due to poor performance of our devices. Use it to adjust time slot between the execution of actions in actions sequences or items concatenated in voice command. If you want to execute actions dependent on each other, e.g. launching of an music player and starting of a playback, you have to give some additional time to music player to be fully launched.

    Actions voice delimiter (e.g. X then Y) - Word used by MtcdTools to extract items names from provided voice input. (e.g. "my music player" <DEFINED WORD> "play").​

    Lollipop limitations
    Due to Lollipop limitations, it is possible that triggering of voice dispatch activity will bring MtcdTools application to front. To avoid this behavior, close MtcdTools using "recent" menu.​