When communicating with a usb device, it is usually necessary to authorize the usb device, and the system application permission box will pop up, which is particularly troublesome, as shown in the figure below: I
studied it today and solved this problem
1. Configuration in AndroidManifest.xml
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />