1

This is one of my activities in my Android Manifest.

<activity
    android:name=".voice.VoiceAccountActivity"
    android:label="Qnet Balance"
    android:screenOrientation="portrait"
    android:theme="@style/AppTheme">

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.VOICE" />

        <data
            android:host="qnet.balance"
            android:scheme="https" />
    </intent-filter>

    <intent-filter>
        <action android:name="android.intent.action.VIEW" />

        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>

</activity>

I've read the Voice Interactions API but every time I say "Open Qnet Balance" it just shows me a bunch of search results from the web. The Browsable and the data qnet.balance I tried to use it as a way to open my app using voice by saying "Open qnet.balance" but that also failed. Anyone have a solution? I'm talking about calling these commands after doing "Ok Google"

Hiroga Katageri
  • 1,345
  • 3
  • 21
  • 40

1 Answers1

1

Change intent filter tag. And do try to change label to one word it will work.

  <activity android:name=".MainActivity" android:label="race">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.VOICE" />
            <data
                android:host="qnet.balance"
                android:scheme="https" />

        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

It opens only launcher activity. I hope this will work

Nisha
  • 132
  • 1
  • 7