public void OnPickFileSuccess(string message) { if (Debug.isDebugBuild) { Debug.Log("File picker success: " + message); } AGFilePicker.OnFileSuccessTrigger(message); }
public void OnPickFileError(string message) { if (Debug.isDebugBuild) { Debug.Log("File picker error: " + message); } AGFilePicker.OnFileErrorTrigger(message); }
public void OnPickAudioFile() { AGFilePicker.PickAudio(audioFile => { var msg = "Audio file was picked: " + audioFile; Debug.Log(msg); AGUIMisc.ShowToast(msg); }, error => AGUIMisc.ShowToast("Cancelled picking audio file")); }
public void OnPickPdfFile() { const string mimeType = "application/pdf"; // pick only pdfs AGFilePicker.PickFile(file => { var msg = "Picked file: " + file; Debug.Log(msg); AGUIMisc.ShowToast(msg); }, error => AGUIMisc.ShowToast("Picking file: " + error), mimeType); }
public void OnPickAudioFile() { AGFilePicker.PickAudio(audioFile => { StartCoroutine(LoadAudioFile(audioFile)); _demoController.audioPanel.SetActive(true); var msg = "Audio file was picked: " + audioFile; Debug.Log(msg); AGUIMisc.ShowToast(msg); }, error => AGUIMisc.ShowToast("Cancelled picking audio file")); }
public void OnPickVideoFileDevice() { var generatePreviewImages = true; AGFilePicker.PickVideo(videoFile => { var msg = "Video file was picked: " + videoFile; Debug.Log(msg); AGUIMisc.ShowToast(msg); image.sprite = SpriteFromTex2D(videoFile.LoadPreviewImage()); }, error => AGUIMisc.ShowToast("Cancelled picking video file: " + error), generatePreviewImages); }
public void PickSoundForNotificationChannel() { if (NotificationChannelsApiCheck()) { return; } AGFilePicker.PickAudio(audioFile => { _soundFilePath = AndroidUri.FromFile(audioFile.OriginalPath).CallStr("getPath"); Debug.Log(_soundFilePath); AGUIMisc.ShowToast(_soundFilePath); }, error => AGUIMisc.ShowToast("Cancelled picking audio file")); }
public void onChooseButtonClicked() { Debug.Log("onChooseButtonClicked"); _vidPlayer.gameObject.GetComponent <PlaybackController>().playButton.SetActive(false); //ew _vidWindow.SetActive(true); var generatePreviewImages = true; AGFilePicker.PickVideo(videoFile => { var msg = "Video file was picked: " + videoFile; string videoPath = videoFile.OriginalPath; _vidPlayer.gameObject.GetComponent <VideoPlayerManager>().LoadVideo(videoPath); _vidPlayer.gameObject.GetComponent <PlaybackController>().playButton.SetActive(true); //ew AGUIMisc.ShowToast(msg); }, error => AGUIMisc.ShowToast("Cancelled picking video file: " + error), generatePreviewImages); }