1. Are you ready for the Galaxy S20? Here is everything we know so far!

Using Google voice open Android Application

Discussion in 'Android Development' started by umang_ag, Aug 21, 2018.

  1. umang_ag

    umang_ag Lurker
    Thread Starter

    Want to open Android Application using Google voice(Ok Google).

    One way to launch an application using App Name(Eg. Ok Google Start appName).

    I want to open the same application using a Different name. Please help to solve this issue.

    Eg: Take inshorts app, it opens App: Ok google Start new, and for same Start inshorts.

    Is there any way to achieve this.

    I already used these approaches but no luck

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


    I added these intent filters in the activity but able to launch this activity from Google voice.

    I also made two activities with two different labels.

    <activity
    android:label="Hello"
    android:name="HelloActivity"
    android:screenOrientation="portrait">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    </activity>

    <activity
    android:label="Test"
    android:name="TestActivityr"
    android:screenOrientation="portrait"/>

    But for this approach, it creates two icons in android.
     


Loading...

Share This Page

Loading...