Class PermissionHelper


  • public class PermissionHelper
    extends java.lang.Object
    When using a Moverio function, the user is notified of any authorization request related to the executed function from the system. This class method is used when permitting or denying the authorization request from the system.
    Since:
    1.0.0
    • Constructor Detail

      • PermissionHelper

        public PermissionHelper​(android.content.Context context)
        This is a PermissionHelper constructor.
        Parameters:
        context - Activity context
        Since:
        1.0.0
      • PermissionHelper

        public PermissionHelper​(android.content.Context context,
                                PermissionGrantResultCallback callback)
        This is a PermissionHelper constructor.
        Parameters:
        context - Activity context
        callback - Callback of permission grant result
        Since:
        1.2.0
    • Method Detail

      • onRequestPermissionsResult

        public void onRequestPermissionsResult​(int requestCode,
                                               java.lang.String[] permissions,
                                               int[] grantResults)
        This method passes to MoverioSDK the result of requesting permissions. The result of requesting permissions gets from ActivityCompat#onRequestPermissionsResult.
        Parameters:
        requestCode - The request code
        permissions - The requested permissions
        grantResults - The grant results
        Since:
        1.0.0
        See Also:
        ActivityCompat#onRequestPermissionsResult
      • release

        public void release()
        Release resources for using PermissionHelper. If you finish using PermissionHelper, you must execute PermissionHelper#release.
        Since:
        1.2.0