Uploading and downloading videos from Android

Source: Internet
Author: User

Send method parameter list:
1. Httprequest.httpmethod method Request method
HttpRequest.HttpMethod.GET GET Mode
HttpRequest.HttpMethod.POST POST Mode
2.String URL Request URLs
3.RequestParams params Parameter object, objects stored as key-value pairs, automatically spliced (without parameters, using the three-parameter send method)

Object creation: Requestparams params = new Requestparams ();
Params.addquerystringparameter ("Method", "info");
Params.addquerystringparameter ("Access_token",
"3.1042851f652496c9362b1cd77d4f849b.2592000.1377530363.3590808424-248414");
4.requestcallback<t> callBack Callback Notification interface,
Onsuccess callback method after a successful request for this action
OnFailure failed callback, not referring to the server return data tells you to fail, but there is a network error ah, the server problem ah, and so on this error



 httputils httputils = new  Httputils (); Httputils.send (HttpRequest.HttpMethod.GET, "http://www.baidu.com", Span style= "color: #0000ff;" >new requestcallback<string> () {@Override // callback public  Responseinfo) {

} // callback with request action failure, not referring to the server return data tells you to fail, but there is a network error ah, the server problem ah, and so on. @Override public void< Span style= "color: #000000;" > OnFailure (httpexception error, String msg) {
}});
Httputils Download method (supports breakpoint continuation): The following are the overloads of the method:Parameters:1. String URL 2. String Target Download file storage location 3. Requestcallback<file>Callback Callback Notification interface download (string URL, string target,requestcallback<file>callback) {} download (string URL, string target,Boolean Autoresume, requestcallback<file>Callback) {}4. When Boolean Autoresume is true, if the destination file exists, then the unfinished portion continues to download. 5.booleanWhen Autorename is true, if the file name is obtained from the request return information, the download is automatically renamed after the download (string URL, string target,Boolean Autoresume,Boolean autorename, requestcallback<file>Callback) {}Add parameter to download download (string URL, string target, requestparams params, requestcallback<file>callback) {} download (string URL, string target, requestparams params,Boolean Autoresume, requestcallback<file>callback) {} download (string URL, string target,requestparams params,Boolean Autoresume, boolean autorename, requestcallback<file> callback) {} //Specify access network mode download ( Httprequest.httpmethod method, string url, string target,requestparams params, requestcallback<file>  callback) {} download (Httprequest.httpmethod method, string url, string target,requestparams params, Boolean Autoresume, requestcallback<file> callback) {} download (Httprequest.httpmethod method, string URL, string Target, Requestparams params, boolean Autoresume, boolean autorename, Requestcallback<file> callback ) {}

Uploading and downloading video from Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.