标签:
项目需求需要在每个url后加上固定的参数
publicsynchronizedstaticBasicNameValuePair getValues(int i){ if(valuePairs==null){ valuePairs =newBasicNameValuePair[5]; valuePairs[0]=newBasicNameValuePair("channels",SPUtils.getInstance().getString("channel")); valuePairs[1]=newBasicNameValuePair("appVersion",AppUtil.getVersion(UIUtils.getContext())); valuePairs[2]=newBasicNameValuePair("deviceUUID",AppUtil.getUniqueIdentification(UIUtils.getContext())); valuePairs[3]=newBasicNameValuePair("deviceModel",AppUtil.getDeviceModel(UIUtils.getContext())); valuePairs[4]=newBasicNameValuePair("deviceVersion",AppUtil.getDeviceVersion(UIUtils.getContext())); } return valuePairs[i]; }
标签:
原文地址:http://www.cnblogs.com/Android-MR-wang/p/5070018.html