Пример #1
0
        private void ImageView_Click(object sender, EventArgs e)
        {
            UpdateFiles();
            lastReqIntent = AndroidUtils.CreateMultiSourceImagePickerIntent(true, outputFileUri, this);

            // Requires both camera and storage permissions
            AndroidUtils.CallWithPermission(new string[] {
                global::Android.Manifest.Permission.Camera,
                global::Android.Manifest.Permission.ReadExternalStorage,
                global::Android.Manifest.Permission.WriteExternalStorage
            }, new string[] {
                Resources.GetString(Resource.String.permissionCameraTitle),
                Resources.GetString(Resource.String.permissionFilesTitle),
                Resources.GetString(Resource.String.permissionFilesTitle)
            }, new string[] {
                Resources.GetString(Resource.String.permissionPhotoExplanation),
                Resources.GetString(Resource.String.permissionFilesExplanation),
                Resources.GetString(Resource.String.permissionFilesExplanation)
            }, lastReqIntent, PhotoRequestCode, PermRequestCode, this);
        }
Пример #2
0
        private void FirePhotoIntent(bool includeCamera)
        {
            Intent finalIntent = AndroidUtils.CreateMultiSourceImagePickerIntent(includeCamera, outputFileUri, this);

            StartActivityForResult(finalIntent, photoRequestCode);
        }