public void CancelDownload(DownloadOperation operation) { Profiler.BeginSample(string.Format("CancelDownload {0}", operation.ID)); AndroidBridge.CallStatic("cancelDownload", Context, operation.ID); Profiler.EndSample(); }
public DownloadOperation StartDownload(BackgroundDownloadOptions options) { try { var id = AndroidBridge.CallStatic <long>("download", Context, options.URL, options.DestinationPath, options.Title, options.Description); return(new AndroidDownloadOperation(this, options, id)); } catch (Exception e) { Debug.LogException(e); } return(null); }
public DownloadOperation GetDownloadOperation(string url) { var id = AndroidBridge.CallStatic <long> ("getDownloadOperation", Context, url); return((id == -1) ? null : new AndroidDownloadOperation(this, new BackgroundDownloadOptions(url), id)); }
public float GetProgress(long id) { return(AndroidBridge.CallStatic <float>("getDownloadProgress", Context, id)); }
public DownloadStatus GetStatus(long id) { return((DownloadStatus)AndroidBridge.CallStatic <int>("getDownloadStatus", Context, id)); }