How to prevent Google & Ask Alexa to open from MyApp

60 views Asked by At

I'm recording the audio via Bluetooth earbuds. As and when user press & hold button, App records the audio/voice from Bluetooth earbuds, which is working fine.

Issue : While user press & hold button, sometimes Open with popup appears asking to open the Google or Ask Alexa Apps. (Attaching the screenshots for better understanding)

  • How can we prevent this open with popup to appear on our App?
  • Do I need to add/update any intent-filter in manifest file?
  • Do I need to change mode in audiomanager ?

Using following code for Bluetooth audio:

audioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
audioManager.startBluetoothSco();
audioManager.setBluetoothScoOn(true);

enter image description here

enter image description here

1

There are 1 answers

0
Usama Altaf On

Use android:exported="false" in your manifest in the activity

<activity android:name=com.mymundane.app.MainActivity" 
    android:exported="false">
</activity>