Nextrek
Diff Revisions
524
vs
525
for /Android/SmartCharging/SmartCharging/app/src/main/java/it/fedeloper/smartcharging/Controller/MapActivity.java
|
@@ -46,6 +46,7 @@ |
46 |
46 |
|
import it.fedeloper.smartcharging.*; |
47 |
47 |
|
import it.fedeloper.smartcharging.Manager.MyLocation; |
48 |
48 |
|
import it.fedeloper.smartcharging.Manager.Utils; |
|
49 |
+ |
import it.fedeloper.smartcharging.Service.EndPoint; |
49 |
50 |
|
import it.fedeloper.smartcharging.Service.HttpClient; |
50 |
51 |
|
import org.json.JSONArray; |
51 |
52 |
|
import org.json.JSONException; |
|
@@ -359,7 +360,7 @@ |
359 |
360 |
|
obj.put("lon", lon); |
360 |
361 |
|
obj.put("distance", 1000000); |
361 |
362 |
|
|
362 |
|
- |
JSONObject resp = HttpClient.SendHttpPostAsync("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/get_list_locali.php", obj); |
|
363 |
+ |
JSONObject resp = HttpClient.SendHttpPostAsync(EndPoint.MAIN_END_POINT + "/get_list_locali.php", obj); |
363 |
364 |
|
|
364 |
365 |
|
JSONArray arr = resp.getJSONArray("locals"); |
365 |
366 |
|
|
|
@@ -499,7 +500,7 @@ |
499 |
500 |
|
obj.put("id", id); |
500 |
501 |
|
|
501 |
502 |
|
|
502 |
|
- |
final JSONObject resp = HttpClient.SendHttpPostAsync("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/get_info_small_locale.php", obj); |
|
503 |
+ |
final JSONObject resp = HttpClient.SendHttpPostAsync(EndPoint.MAIN_END_POINT + "/get_info_small_locale.php", obj); |
503 |
504 |
|
|
504 |
505 |
|
if (resp == null) { |
505 |
506 |
|
|
|
@@ -577,7 +578,7 @@ |
577 |
578 |
|
obj.put("user_id", id); |
578 |
579 |
|
|
579 |
580 |
|
|
580 |
|
- |
final JSONObject resp = HttpClient.SendHttpPostAsync("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/get_avatar.php", obj); |
|
581 |
+ |
final JSONObject resp = HttpClient.SendHttpPostAsync(EndPoint.MAIN_END_POINT +"/get_avatar.php", obj); |
581 |
582 |
|
|
582 |
583 |
|
if (resp.getInt("return") == 0) { |
583 |
584 |
|
String filename = resp.getString("avatar"); |