Manual

What is this?


This page will guide you on how to get myVoice to do your bid.
Use it when you don't understand something you see in the voice editing page.
The question mark links ([ ? ]) closest to your anigma will get you here faster.

Editing a Voice


Editing voices on the website only works if you are logged in as a user (using a Google account), since you have to let us know which phone it will work on.

Any change you make on the website will only work on phones that logged in to the same user,
and any change you make on the phone will only apply to the phone or to the phones that logged in to the same user.

If you made changes on your phone without being logged in, don't worry!
The phone will offer to associate the changes with the next user you login to until you finally choose to associate it.

The more you contribute, the more everyone enjoys

Administrators will constantly look at your private additions (don't worry, see Privacy), and use them to make everyone's phone more responsive.

Adding a new command pattern to an existing voice

  1. Look up the voice you want to customize and click on Edit.
  2. Under "What will you say?" add a new command pattern, putting variables (such as names & numbers) inside parentheses.
    • Consult the examples (marked by Command) to understand which variables are required for the command to work properly.
    • If you know your regular expressions, you can constrain your variable into one by adding a colon (:) after the variable's name followed by the regular expression.
      You can see how "set alarm for 820" works.

Fixing actions for an existing voice and creating a new voice (for developers)

This is only available on the website as this is a somewhat tedious work that requires a quite a lot of Googling.

  • If you want to create a new voice, click on "New New voice".
  • If you want to create a new voice but use another voice for reference, look up the voice and click on Clone.
  • If you want to edit an existing voice, look up the voice, click on Edit and check "Developer mode?".
    The changes you make will override the existing voice, though the voice can still receive updates made by the administrators (see each section below for when it won't).

Description

Enter a simple sentence that describes the actions that will be taken when this voice is ignited.
This description is visible to the user when looked up on the website and on the phone.

Category

Enter an existing or new category name.
Use this to group different voices under one name, for easier lookup on the web and on the phone.

What will you say?

Enter command patterns, putting variables (such as names & numbers) inside parentheses.

  • Command patterns from the origin voice will also ignite this voice.
  • You can constrain the variables with Ruby's implementation of regular expressions, adding a colon (:) after the variable's name followed by the regular expression.
    See how "set alarm for 820" works.

What will it mean?

For every variable name you use in the command patterns a new variable will spawn under "What will it mean?".
Set its Type, Sub-type & Target as expected by the actions.
Variables act just like Constants, except for the fact that their value varies according the command.

  • Variables different from the origin voice will stop receiving updates made by the administrators.

What will happen?

  • If any action is different from the origin voice, this section will stop receiving updates made by the administrators.
Description

This is a short description of what the action does, so the reader won't have to parse the constants & variables to understand.
Use the form of "Do this", so it looks good when showing the reaction to the commands ("Say <command pattern> to <action description>").

Type

Each Type executes different code on the phone to create the generic request.
The variables & constants are handled differently by each Type.

Type Implementations
Start Activity
Creates an intent and activates it using startActivityForResult. and passes the result to "Expected result".
If the activity is not available on the phone, acts as failed for Resolution.
Send Broadcast
Creates an intent and activates it using sendBroadcast, which always succeeds for Resolution.
Constants

Set its Type, Sub-type & Target as expected by the action.

Type Implementations

If the Type has multiple Sub-types available, make sure you use the same target for the ones you want to group together into one What will it mean?/Constants.

String
Interpulated as is. Anything can match this.
Integer
Interpulated as an integer. Only numbers can match this.
Boolean
Interpulated as a boolean. Only 'true', 'false', '1', '0', 'yes' & 'no' can match this.
Contact ID
Finds a contact by the partial name and translates to a String of the contact's ID.
Contact Phone Number
Finds a contact by the partial name and translates to a String of the contact's phone number. Phone numbers will be filtered if Type Label is given.
Contact Email
Finds a contact by the partial name and translates to a String of the contact's Email. Emails will be filtered if Type Label is given.
Contact Address
Finds a contact by the partial name and translates to a String of the contact's postal address. Postal addresses will be filtered if Type Label is given.
Time Milliseconds
Generates a Long representing milliseconds since Epoch. This is built from all the different Sub-types given. Will always be in the future unless a Year is given.
Time Seconds
Generates a Long representing seconds since Epoch. This is built from all the different Sub-types given. Will always be in the future unless a Year is given.
Time Period Milliseconds
Generates a Long representing milliseconds from the current time. This is built from all the different Sub-types given. Will always be in the future unless a Year is given.
Time Period Seconds
Generates an Integer representing seconds from the current time. This is built from all the different Sub-types given. Will always be in the future unless a Year is given.
Target Implementations
Action type Target Type Usage
Start Activity
Send Broadcast
class String Split by '.' into packageName and className and given to the intent using setClass(packageName, className).
action String Given to the intent using setAction(action).
component String Given to the intent using setComponent(ComponentName.unflattenFromString(component)).
category String Given to the intent using addCategory(category).
data String If no type is specified, given to the intent using setData(Uri.parse(data)), otherwise given using setDataAndType(Uri.parse(data), type).
This may also use variables withing it. If a variable's Type is a string, the Target is "data-url", and the constant's value is "http://(url)", the part saying (url) will be replaced by the variable.
type String If no data is specified, given to the intent using setType(type), otherwise given using setDataAndType(Uri.parse(data), type).
    Anything else is given to the intent using putExtra(Target, Value).
Expected result

If specified, when the action's result does not equal this values, acts as failed for Resolution.

Minimum system version

If specified, when the version of the operating system of the phone is lower than this, acts as failed for Resolution without trying.

Resolution

According to the action's result, the application will decide if and when to execute the next action.

And then...
Start the next action after this action is complete, if successful.
Or else...
Start the next action after this action is complete (or unavailable), if unsuccessful.
While executing...
If this action is available, start the next action right after starting this action.