Switch UA to Android default and added x-wap-profile header
This commit is contained in:
parent
cdd6d59e6e
commit
ecaaff50da
2 changed files with 3 additions and 2 deletions
|
@ -142,7 +142,7 @@ public class MmsCommunication {
|
|||
}
|
||||
|
||||
protected static AndroidHttpClient constructHttpClient(Context context, MmsConnectionParameters mmsConfig) {
|
||||
AndroidHttpClient client = AndroidHttpClient.newInstance("TextSecure/0.1", context);
|
||||
AndroidHttpClient client = AndroidHttpClient.newInstance("Android-Mms/2.0", context);
|
||||
HttpParams params = client.getParams();
|
||||
HttpProtocolParams.setContentCharset(params, "UTF-8");
|
||||
HttpConnectionParams.setSoTimeout(params, 20 * 1000);
|
||||
|
|
|
@ -54,7 +54,8 @@ public class MmsSendHelper extends MmsCommunication {
|
|||
request.setEntity(entity);
|
||||
request.setParams(client.getParams());
|
||||
request.addHeader("Accept", "*/*, application/vnd.wap.mms-message, application/vnd.wap.sic");
|
||||
|
||||
// request.addHeader("x-wap-profile", "http://www.htcmms.com.tw/Android/Common/nexusone/ua-profile.xml");
|
||||
request.addHeader("x-wap-profile", "http://www.google.com/oha/rdf/ua-profile-kila.xml");
|
||||
HttpResponse response = client.execute(target, request);
|
||||
StatusLine status = response.getStatusLine();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue