Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sending the BRAND of the phone

  • Loading branch information...
commit 72939738904e09763371fd734acfa2d41fce19b7 1 parent 2f769ef
Jon Vlachoyiannis authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/com/sfalma/trace/Sfalma.java
View
5 src/com/sfalma/trace/Sfalma.java
@@ -58,7 +58,7 @@
public class Sfalma {
// FIXME: Use Gson
- public static String createJSON(String app_package, String version, String phoneModel, String android_version, String stackTrace, String wifi_status, String mob_net_status, String gps_status, Date occuredAt) throws Exception {
+ public static String createJSON(String app_package, String version, String phoneModel, String android_version, String stackTrace, String wifi_status, String mob_net_status, String gps_status, Date occuredAt, String brand) throws Exception {
JSONObject json = new JSONObject();
JSONObject request_json = new JSONObject();
@@ -95,6 +95,7 @@ public static String createJSON(String app_package, String version, String phone
application_json.put("wifi_on", wifi_status);
application_json.put("mobile_net_on", mob_net_status);
application_json.put("gps_on", gps_status);
+ application_json.put("brand", brand);
json.put("application_environment", application_json);
client_json.put("version", "sfalma-version-0.6");
@@ -144,7 +145,7 @@ public static void submitError(int sTimeout, Date occuredAt, final String stackt
httpPost.addHeader("X-Sfalma-Api-Key", G.API_KEY);
List <NameValuePair> nvps = new ArrayList <NameValuePair>();
- nvps.add(new BasicNameValuePair("data", createJSON(G.APP_PACKAGE, G.APP_VERSION, G.PHONE_MODEL, G.ANDROID_VERSION, stacktrace, SfalmaHandler.isWifiOn(), SfalmaHandler.isMobileNetworkOn(), SfalmaHandler.isGPSOn(), occuredAt)));
+ nvps.add(new BasicNameValuePair("data", createJSON(G.APP_PACKAGE, G.APP_VERSION, G.PHONE_MODEL, G.ANDROID_VERSION, stacktrace, SfalmaHandler.isWifiOn(), SfalmaHandler.isMobileNetworkOn(), SfalmaHandler.isGPSOn(), occuredAt,G.PHONE_BRAND)));
//nvps.add(new BasicNameValuePair("hash", MD5(stacktrace)));
httpPost.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8));
Please sign in to comment.
Something went wrong with that request. Please try again.