Package com.epson.moverio.util
Class PermissionHelper
- java.lang.Object
-
- com.epson.moverio.util.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
PERMISSION_DENIED
static int
PERMISSION_GRANTED
static java.lang.String
PERMISSION_TYPE_CAMERA
Allows to access camera device.static java.lang.String
PERMISSION_TYPE_RECORD_AUDIO
Allows to record audio.static java.lang.String
PERMISSION_TYPE_USB
Allows to communicate via USB.static java.lang.String
PERMISSION_TYPE_WRITE_EXTERNAL_STORAGE
Allows to write to external storage.
-
Constructor Summary
Constructors Constructor Description PermissionHelper(android.content.Context context)
This is a PermissionHelper constructor.PermissionHelper(android.content.Context context, PermissionGrantResultCallback callback)
This is a PermissionHelper constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)
This method passes to MoverioSDK the result of requesting permissions.void
release()
Release resources for using PermissionHelper.
-
-
-
Field Detail
-
PERMISSION_TYPE_USB
public static final java.lang.String PERMISSION_TYPE_USB
Allows to communicate via USB.- Since:
- 1.2.0
- See Also:
- Communicate via USB, Constant Field Values
-
PERMISSION_TYPE_CAMERA
public static final java.lang.String PERMISSION_TYPE_CAMERA
Allows to access camera device.- Since:
- 1.2.0
- See Also:
- Manifest.permission#CAMERA, Constant Field Values
-
PERMISSION_TYPE_WRITE_EXTERNAL_STORAGE
public static final java.lang.String PERMISSION_TYPE_WRITE_EXTERNAL_STORAGE
Allows to write to external storage.- Since:
- 1.2.0
- See Also:
- Manifest.permission#WRITE_EXTERNAL_STORAGE, Constant Field Values
-
PERMISSION_TYPE_RECORD_AUDIO
public static final java.lang.String PERMISSION_TYPE_RECORD_AUDIO
Allows to record audio.- Since:
- 1.2.0
- See Also:
- Manifest.permission#RECORD_AUDIO, Constant Field Values
-
PERMISSION_DENIED
public static final int PERMISSION_DENIED
- See Also:
- Constant Field Values
-
PERMISSION_GRANTED
public static final int PERMISSION_GRANTED
- See Also:
- Constant Field Values
-
-
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 contextcallback
- 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 codepermissions
- The requested permissionsgrantResults
- 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
-
-