Selaa lähdekoodia

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
Sam Lantinga 4 vuotta sitten
vanhempi
commit
3172615074
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      android-project/app/src/main/AndroidManifest.xml

+ 4 - 0
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>