AsteroidOSSync icon indicating copy to clipboard operation
AsteroidOSSync copied to clipboard

[Maintenance] Check for permission to access bluetooth device info

Open Doomsdayrs opened this issue 3 years ago • 0 comments

Message 1

            The below function was generated by Android Studio to ensure `device.getName` occurs successfully.

            As the message from Android Studio `lint`:
            "Error: Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException [MissingPermission]"

            ~ Doomsdayrs

Message 2

  // TODO: Consider calling
                //    ActivityCompat#requestPermissions
                // here to request the missing permissions, and then overriding
                //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
                //                                          int[] grantResults)
                // to handle the case where the user grants the permission. See the documentation
                // for ActivityCompat#requestPermissions for more details.            

Doomsdayrs avatar Jul 18 '22 03:07 Doomsdayrs