| Line 48... |
Line 48... |
| 48 |
String data = URLEncoder.encode("time", "UTF-8") + "=" + URLEncoder.encode(time.toString(), "UTF-8");
|
48 |
String data = URLEncoder.encode("time", "UTF-8") + "=" + URLEncoder.encode(time.toString(), "UTF-8");
|
| 49 |
data += "&" + URLEncoder.encode("eventType", "UTF-8") + "=" + URLEncoder.encode(eType.name(), "UTF-8");
|
49 |
data += "&" + URLEncoder.encode("eventType", "UTF-8") + "=" + URLEncoder.encode(eType.name(), "UTF-8");
|
| 50 |
data += "&" + URLEncoder.encode("sessionId", "UTF-8") + "=" + URLEncoder.encode(sessionId, "UTF-8");
|
50 |
data += "&" + URLEncoder.encode("sessionId", "UTF-8") + "=" + URLEncoder.encode(sessionId, "UTF-8");
|
| 51 |
data += "&" + URLEncoder.encode("userId", "UTF-8") + "=" + URLEncoder.encode(Long.toString(userId), "UTF-8");
|
51 |
data += "&" + URLEncoder.encode("userId", "UTF-8") + "=" + URLEncoder.encode(Long.toString(userId), "UTF-8");
|
| 52 |
data += "&" + URLEncoder.encode("email", "UTF-8") + "=" + URLEncoder.encode(email, "UTF-8");
|
52 |
data += "&" + URLEncoder.encode("email", "UTF-8") + "=" + URLEncoder.encode(email, "UTF-8");
|
| - |
|
53 |
if (logDataInJson != null) {
|
| - |
|
54 |
data += "&" + URLEncoder.encode("jsonLogData", "UTF-8")
|
| 53 |
data += "&" + URLEncoder.encode("jsonLogData", "UTF-8") + "=" + URLEncoder.encode(logDataInJson.toString(), "UTF-8");
|
55 |
+ "=" + URLEncoder.encode(logDataInJson.toString(), "UTF-8");
|
| - |
|
56 |
}
|
| 54 |
|
57 |
|
| 55 |
// Send data
|
58 |
// Send data
|
| 56 |
URL url = new URL("http://" + googleAppUrl + "/add-data-log");
|
59 |
URL url = new URL("http://" + googleAppUrl + "/add-data-log");
|
| 57 |
URLConnection conn = url.openConnection();
|
60 |
URLConnection conn = url.openConnection();
|
| 58 |
conn.setDoOutput(true);
|
61 |
conn.setDoOutput(true);
|