I am creating a music player application and I want to open my application using "OK Google" command. I searched a lot but I can't find anything related to that. I also defined the voice action in the intent filter like below but that didn't helped either.
<activity
android:name="com.demo.musicplayer.ActivityMusicPlayer"
android:configChanges="keyboardHidden|orientation"
android:label="XPlayer">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VOICE_COMMAND"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
It always opens the google play music application whenever I try with the voice command. Also I can't find any option to set my app as default. I am testing in Android Oreo