コード例 #1
0
        private void ReceiveUploadedUriPreHoneyComb(Intent intent)
        {
            Uri upload = intent.Data;

            mUriUploadCallback.OnReceiveValue(upload);
            mUriUploadCallback = null;
        }
コード例 #2
0
 private void ResetUriUploadCallback()
 {
     if (mUriUploadCallback != null)
     {
         mUriUploadCallback.OnReceiveValue(null);
         mUriUploadCallback = null;
     }
 }
コード例 #3
0
 private void ReceiveUploadedUriArray(Intent data)
 {
     Uri[] uploadedUris;
     try
     {
         uploadedUris = new Uri[] { Uri.Parse(data.DataString) };
     }
     catch (System.Exception e)
     {
         uploadedUris = null;
     }
     mUriArrayUploadCallback.OnReceiveValue(uploadedUris);
     mUriArrayUploadCallback = null;
 }
コード例 #4
0
        private void ReceiveUploadedUri(Intent intent)
        {
            Uri uploadedFileUri;

            try
            {
                string uploadedUriFilePath = UriUtils.GetFilePathFromUri(instance, intent.Data);
                File   upload = new File(uploadedUriFilePath);
                uploadedFileUri = Uri.FromFile(upload);
            }
            catch (System.Exception)
            {
                uploadedFileUri = null;
            }

            mUriUploadCallback.OnReceiveValue(uploadedFileUri);
            mUriUploadCallback = null;
        }
コード例 #5
0
 public override bool OnShowFileChooser(WebView webView, IValueCB uploadMsg, FileChooserParams fileChooserParams)
 {
     ChatWindow.ChooseUriArrayToUpload(uploadMsg);
     return(true);
 }
コード例 #6
0
 private void ChooseUriArrayToUpload(IValueCB uriArrayValueCallback)
 {
     ResetAllUploadCallbacks();
     mUriArrayUploadCallback = uriArrayValueCallback;
     StartFileChooserActivity();
 }