mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-30 17:36:22 +00:00
[Camera permission] chech camera's permission on picture button on chat + update translation ressources for new alertview
This commit is contained in:
parent
f8a8a224c1
commit
0251b6e123
9 changed files with 7 additions and 2 deletions
|
|
@ -18,7 +18,8 @@
|
|||
*/
|
||||
|
||||
#import <MobileCoreServices/UTCoreTypes.h>
|
||||
|
||||
#import <AVFoundation/AVCaptureDevice.h>
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#import "ImagePickerView.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
|
|
@ -226,7 +227,11 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
|
||||
[sheet addButtonWithTitle:NSLocalizedString(@"Camera", nil)
|
||||
block:^() {
|
||||
block(UIImagePickerControllerSourceTypeCamera);
|
||||
if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusAuthorized ){
|
||||
block(UIImagePickerControllerSourceTypeCamera);
|
||||
}else{
|
||||
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Camera's permission", nil) message:NSLocalizedString(@"Camera not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
|
||||
}
|
||||
}];
|
||||
}
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Reference in a new issue