Note that there are some explanatory texts on larger screens.

plurals
  1. POadding <input> element to <trigger> causes serivce launch to crash?
    text
    copied!<p>I'll admit, I'm pretty rusty with android development. It's been a few years for me. As a refresher, I wanted to change the countdown app so that i could set the starting time with just my voice.</p> <p>Simple, right?</p> <p>I loaded up the sample apps and threw the timer app onto my glass. Everything worked. I was thrilled.</p> <p>Then, following the instructions here <a href="https://developers.google.com/glass/develop/gdk/input/voice" rel="nofollow">GDK voice input</a> i was able to change the "ok glass" command. Still worked. Cool.</p> <p>Then, i added the string to trigger the voice transcribing function after 'launching' the timer app. Now, i can "ok glass" to launch the timer app, and i can say a few numbers and see them transcribed, but as soon as i stop the "swipe down to cancel" shows up and then shortly thereafter the app crashes and i end up back at my home screen. </p> <p>Is there something simple that I have over looked? I added a <code>Log.i()</code> call to the <code>onStartCommand()</code> and it shows up in logcat ... when i remove the <code>&lt;prompt&gt;</code> element from the <code>remind_me.xml</code> file</p> <p>Here's the excerpt from the manifest:</p> <pre><code>&lt;service android:name="com.google.android.glass.sample.timer.TimerService" android:icon="@drawable/ic_timer" android:label="@string/app_name" android:enabled="true" android:exported="true"&gt; &lt;intent-filter&gt; &lt;action android:name="com.google.android.glass.action.VOICE_TRIGGER" /&gt; &lt;/intent-filter&gt; &lt;meta-data android:name="com.google.android.glass.VoiceTrigger" android:resource="@xml/remind_me" /&gt; &lt;/service&gt; </code></pre> <p><strong>WORKING:</strong></p> <pre><code>&lt;trigger keyword="@string/voice_start_timer"&gt; &lt;/trigger&gt; </code></pre> <p><strong>NOT WORKING:</strong></p> <pre><code>&lt;trigger keyword="@string/voice_start_timer"&gt; &lt;input prompt="@string/voice_timer_prompt" /&gt; &lt;/trigger&gt; </code></pre> <p>So what am i missing? What additional info do you need? Thanks for your time and patience. I appreciate it!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload