Android传递中文参数方法(之一)_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > Android传递中文参数方法(之一)

Android传递中文参数方法(之一)

 2017/10/6 22:43:06  IT君君  程序员俱乐部  我要评论(0)
  • 摘要:最近在做app,用的volley传参,有一个地方传中文参数不行(貌似是get方式),我又试了下post方式,成功了,记录下,以后有用!RequestQueuerequestQueue=Volley.newRequestQueue(getApplicationContext());StringRequeststringrequest=newStringRequest(Request.Method.POST,"http:/***",newResponse.Listener<String>
  • 标签:android 方法

最近在做app,用的volley传参,有一个地方传中文参数不行(貌似是get方式),我又试了下post方式,成功了,记录下,以后有用!

 

 

 

RequestQueue requestQueue = Volley.newRequestQueue(getApplicationContext());
StringRequest stringrequest=new StringRequest(Request.Method.POST, "http:/***", new Response.Listener<String>() {
@Override
public void onResponse(String s) {
Toast.makeText(CommitApprasialActivity.this,"",Toast.LENGTH_SHORT).show();
RepairInfor rep=new RepairInfor();
rep.setRep_appraisal(edit_appraisal.getText().toString());
RepairListActivity.instance.finish();
Rep_ItemActivity.instance.finish();
startActivity(new Intent(CommitApprasialActivity.this,RepairListActivity.class));
finish();
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
}
}){
protected Map<String,String> getParams(){
Map<String,String> map=new HashMap<String, String>();
map.put("",);
map.put("",);
return map;
}
};
requestQueue.add(stringrequest);
上一篇: .Net下C#针对Excel开发控件汇总(ClosedXML,EPPlus,NPOI) 下一篇: 没有下一篇了!
发表评论
用户名: 匿名