public void PickContact() { #if !DISABLE_CONTACT_PICKER IGContactPicker.PickContact(Debug.Log, () => { Debug.Log("Picking contact was cancelled"); }); #else ExampleUtil.LogFeatureDisabled(); #endif }
public void OnRequestReviewDialog() { #if !DISABLE_STOREKIT IGAppStore.RequestReview(); #else ExampleUtil.LogFeatureDisabled(); #endif }
public void SaveImageToPhotoLibrary() { #if !DISABLE_IMAGE_PICKERS IGImagePicker.SaveImageToGallery(testImage); #else ExampleUtil.LogFeatureDisabled(); #endif }
public void OnBiometricAuthentication() { #if !DISABLE_BIOMETRIC_AUTH if (IGLocalAuthentication.IsLocalAuthenticationAvailable) { const IGLocalAuthentication.Policy policy = IGLocalAuthentication.Policy.DeviceOwnerAuthenticationWithBiometrics; IGLocalAuthentication.AuthenticateWithBiometrics("Please, confirm your identity", policy, () => { Debug.Log("Authentication was successful"); }, error => Debug.Log("Authentication failed: " + error)); } else { Debug.Log("Device does not support biometric authentication."); } #else ExampleUtil.LogFeatureDisabled(); #endif }
public void PickVideoFromPhotosAlbum() { #if !DISABLE_IMAGE_PICKERS const bool allowEditing = false; var screenPosition = new Vector2(Screen.width / 2, Screen.height / 2); IGImagePicker.PickVideoFromPhotoLibrary(path => { _lastPickedVideoPath = path; Debug.Log("Successfully picked video from photos album: " + path); EditVid(path); }, () => Debug.Log("Picking video from photos album cancelled"), allowEditing, screenPosition); #else ExampleUtil.LogFeatureDisabled(); #endif }
public void PickImageFromPhotoLibrary() { #if !DISABLE_IMAGE_PICKERS const bool allowEditing = false; const float compressionQuality = 0.5f; var screenPosition = new Vector2(Screen.width, Screen.height); // On iPads ONLY you can choose screen position of popover IGImagePicker.PickImageFromPhotoLibrary(tex => { Debug.Log("Successfully picked image from photo library"); image.sprite = SpriteFromTex2D(tex); // IMPORTANT! Call this method to clean memory if you are picking and discarding images Resources.UnloadUnusedAssets(); }, () => Debug.Log("Picking image from photo library cancelled"), compressionQuality, allowEditing, screenPosition); #else ExampleUtil.LogFeatureDisabled(); #endif }
public void PickImageFromPhotosAlbum() { #if !DISABLE_IMAGE_PICKERS const bool allowEditing = true; const float compressionQuality = 0.1f; var screenPosition = new Vector2(Screen.width / 2, Screen.height / 2); IGImagePicker.PickImageFromPhotosAlbum(tex => { Debug.Log("Successfully picked image from photos album"); image.sprite = SpriteFromTex2D(tex); // IMPORTANT! Call this method to clean memory if you are picking and discarding images Resources.UnloadUnusedAssets(); }, () => Debug.Log("Picking image from photos album cancelled"), compressionQuality, allowEditing, screenPosition); #else ExampleUtil.LogFeatureDisabled(); #endif }
public void PickImageFromCamera() { #if !DISABLE_IMAGE_PICKERS const bool allowEditing = true; const float compressionQuality = 0.8f; const IGImagePicker.CameraType cameraType = IGImagePicker.CameraType.Front; const IGImagePicker.CameraFlashMode flashMode = IGImagePicker.CameraFlashMode.On; IGImagePicker.PickImageFromCamera(tex => { Debug.Log("Successfully picked image from camera"); image.sprite = SpriteFromTex2D(tex); // IMPORTANT! Call this method to clean memory if you are picking and discarding images Resources.UnloadUnusedAssets(); }, () => Debug.Log("Picking image from camera cancelled"), compressionQuality, allowEditing, cameraType, flashMode); #else ExampleUtil.LogFeatureDisabled(); #endif }