[MTCD Software Development] f1x:
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.​