From 3172615074fe61723c0879b7215107deb3344126 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 4 Aug 2021 13:13:22 -0700
Subject: [PATCH] Let Android know that we can handle USB devices
This is important on Android 29 and above if you don't want to be prompted for each device that you open
---
android-project/app/src/main/AndroidManifest.xml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/android-project/app/src/main/AndroidManifest.xml b/android-project/app/src/main/AndroidManifest.xml
index 33b77cf9f..309334620 100644
--- a/android-project/app/src/main/AndroidManifest.xml
+++ b/android-project/app/src/main/AndroidManifest.xml
@@ -77,6 +77,10 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
+ <!-- Let Android know that we can handle some USB devices and should receive this event -->
+ <intent-filter>
+ <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
+ </intent-filter>
<!-- Drop file event -->
<!--
<intent-filter>