I am developing an Android application, which connects with a Raspberry Pi hardware via the USB port. The issue is that this system dialog (as shown in the picture above) pops up every time I connect it. Requiring to tap on 'Allow' every time is resulting in bad user experience. If the user taps to 'Deny' or dismisses the dialog, the Raspberry Pi is unable to detect the connected Android device.
Is there a way to bypass this? Note that I'm using a non-root Samsung tablet powered by Android.
(Reposted the question here as suggested by someone in the comments. OP here: https://stackoverflow.com/questions/58371723/how-to-bypass-system-dialog-asking-to-allow-access-to-tablet-data-on-android-tab)