框架集成地址Android,可以不再拷代碼了嗎?
參數(shù)說(shuō)明1:Context(這個(gè)不多說(shuō))
參數(shù)說(shuō)明2:String(網(wǎng)絡(luò)請(qǐng)求地址)
參數(shù)說(shuō)明3:String/String[](form表單中的name的名稱(chēng))
參數(shù)說(shuō)明4:String/String[](需要上傳文件的路徑,例如:/sdcard/xxx.jpg)
參數(shù)說(shuō)明5:boolean(是否打開(kāi)調(diào)試日志...設(shè)置為true 的時(shí)候 logcat中輸入 qqkj_frame)
參數(shù)說(shuō)明5:HttpUploadListener(上傳進(jìn)度回調(diào)監(jiān)聽(tīng),例如,返回10,就是10%)
上傳單個(gè)文件
HttpUploadUtil.getIns()._get_http_upload(Context,String,String,String,boolean,HttpUploadListener)
上傳多個(gè)文件
HttpUploadUtil.getIns().get_http_upload_more(Context,String,String[],String[],boolean,HttpUploadListener)
函數(shù)返回值說(shuō)明:HttpUploadModel
HttpUploadModel._response_content (服務(wù)器返回的response內(nèi)容)
HttpUploadModel._response_code (服務(wù)器返回的狀態(tài)碼,例如 200, 404, 500等)
HttpUploadModel._response_error (返回true,表示請(qǐng)求成功,false,表示請(qǐng)求失敗)
HttpUploadModel._response_error_msg (請(qǐng)求后的提示信息,例如,服務(wù)器請(qǐng)求數(shù)據(jù)接口正常...請(qǐng)求失敗這類(lèi)的提示信息)
這個(gè)不寫(xiě)例子了....