Ejemplo n.º 1
0
 public void OnPickFileSuccess(string message)
 {
     if (Debug.isDebugBuild)
     {
         Debug.Log("File picker success: " + message);
     }
     AGFilePicker.OnFileSuccessTrigger(message);
 }
Ejemplo n.º 2
0
 public void OnPickFileError(string message)
 {
     if (Debug.isDebugBuild)
     {
         Debug.Log("File picker error: " + message);
     }
     AGFilePicker.OnFileErrorTrigger(message);
 }
Ejemplo n.º 3
0
 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"));
 }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 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"));
 }
Ejemplo n.º 6
0
        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"));
        }
Ejemplo n.º 8
0
    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);
    }