private void PrintResult(UM_MediaResult result)
    {
        if (result.IsSucceeded)
        {
            var media          = result.Media;
            var mediaThumbnail = media.Thumbnail;
            Debug.Log("Thumbnail width: " + mediaThumbnail.width + " / height: " + mediaThumbnail.height);
            Debug.Log("media.Type: " + media.Type);
            Debug.Log("media.Path: " + media.Path);

            UM_DialogsUtility.ShowMessage("Success", "Image Info \n " +
                                          "Thumbnail width: " + mediaThumbnail.width + " / height: " + mediaThumbnail.height + " \n " +
                                          "media.Type: " + media.Type + " \n " +
                                          "media.Path: " + media.Path);

            ApplyImageToGUI(mediaThumbnail);
            //path can be null when we taking a picture directly from a camera.
            //ios will not save it on a disk
            if (!string.IsNullOrEmpty(media.Path))
            {
                byte[] movieBytes = File.ReadAllBytes(media.Path);
                Debug.Log("picked file bytes size : " + movieBytes.Length);
            }
        }
        else
        {
            UM_DialogsUtility.ShowMessage("Failed", result.Error.FullMessage);
        }
    }
예제 #2
0
 private void ValidateResult(UM_MediaResult result, UM_MediaType type)
 {
     Assert.IsTrue(result.IsSucceeded);
     Assert.IsNotNull(result.Media.Thumbnail);
     Assert.IsTrue(result.Media.Type == type);
 }