Java Code Examples for com.theartofdev.edmodo.cropper.CropImage#isExplicitCameraPermissionRequired()

The following examples show how to use com.theartofdev.edmodo.cropper.CropImage#isExplicitCameraPermissionRequired() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PickImageActivity.java    From social-app-android with Apache License 2.0 5 votes vote down vote up
@SuppressLint("NewApi")
public void onSelectImageClick(View view) {
    if (CropImage.isExplicitCameraPermissionRequired(this)) {
        requestPermissions(new String[]{Manifest.permission.CAMERA}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);
    } else {
        CropImage.startPickImageActivity(this);
    }
}
 
Example 2
Source File: PickImageActivity.java    From social-app-android with Apache License 2.0 5 votes vote down vote up
@SuppressLint("NewApi")
public void onSelectImageClick(View view) {
    if (CropImage.isExplicitCameraPermissionRequired(this)) {
        requestPermissions(new String[]{Manifest.permission.CAMERA}, CropImage.CAMERA_CAPTURE_PERMISSIONS_REQUEST_CODE);
    } else {
        CropImage.startPickImageActivity(this);
    }
}