Task: do something in my app by command from android wear watch by speaking command. It the same as send command from google search (by speaking or writing command).
How-to described at http://developer.android.com/training/wearables/apps/voice.html "Declare App-provided Voice Actions"
I created two activities:
<activity
android:name=".MainActivity"
android:label="speech test main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SomeAction"
android:label="speech test action" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Both activities can be launched from google search by command "start [android:label for activity]". Then I can do corresponding action at onResume().
But at system launcher icon is created for each activity! I tried to change category to DEFAULT, icon disappears, but activity cannot be launched from google search. Seems to be google search can launch activities with LAUNCHER category only.
So, need to launch activity (or just send intent, if possible) from google search. Problem - extra icons on launcher.