0

There is an Activity with data pulled from the remote API. The Manifest file looks like this

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.myapp.glass"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="15" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">

        <activity
            android:name=".MainActivity"
            android:enabled="true"
            android:label="@string/title_activity_main">

            <intent-filter>
                <action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
            </intent-filter>

            <meta-data
                android:name="com.google.android.glass.VoiceTrigger"
                android:resource="@xml/voice_trigger_start" />
        </activity>
    </application>
</manifest>

The filevoice_trigger_start works and the command from it is properly detected.

<?xml version="1.0" encoding="utf-8"?>
<trigger command="LISTEN_TO" />

The app does not crash, it works Ok, but it does not appear in the Glass Launcher. Look at the images.

All other apps I instal via the Market are here.

Why?

PS. I install my demo app via the console. It's not live app.

Community
  • 1
  • 1
sandalone
  • 41,141
  • 63
  • 222
  • 338
  • Could you share voice_trigger_start? – pt2121 Sep 15 '14 at 13:53
  • so, when you say "ok glass", there is no "listen to" menu? – pt2121 Sep 15 '14 at 14:56
  • The expected behavior is you'll see "listen to" menu and when you tap, you'll see your app under that menu. – pt2121 Sep 15 '14 at 15:00
  • @EntryLevelDev I checked and the app does appear and I can select it. But if I open the app called "Glass Launcher", I don't see my app there. Is this region maybe reserved only for published apps? As any app I install from the market, I can see there. But not mine installed via the console. – sandalone Sep 15 '14 at 15:03
  • So you want to say "Glass Launcher" to trigger your app? sorry, I don't get your "Glass Launcher" part. It's not in standard menu – pt2121 Sep 15 '14 at 15:04
  • @EntryLevelDev Check new snapshots. Maybe I am using the wrong vocabulary. No, I don't want to say it. I want my app to appear there (if possible) when I instal it. Just like my demo app appears in the menu of Android phone. – sandalone Sep 15 '14 at 15:12
  • Got you..."Glass Launcher" is a third party app. it's not a build in glass launcher so it's hard to guess what it really does. Anyway, please see my edited answer... – pt2121 Sep 15 '14 at 15:14

1 Answers1

1

LISTEN_TO is one of the existing commands. The expected behavior is you'll see "listen to" menu and when you tap, you'll see your app under that menu.

<?xml version="1.0" encoding="utf-8"?>
<trigger command="LISTEN_TO" />

If you want a custom command, try keyword.

voice_trigger_start.xml

<trigger keyword="@string/your_custom_command" />

Edit

Based on your comments, try adding this in your activity tag in your manifest.

<intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

You might need to reboot your Glass.

pt2121
  • 11,720
  • 8
  • 52
  • 69