Nextrek
Diff Revisions
524
vs
525
for /Android/SmartCharging/SmartCharging/app/src/main/java/it/fedeloper/smartcharging/Controller/RegisterActivity.java
|
@@ -27,6 +27,7 @@ |
27 |
27 |
|
import android.widget.RadioButton; |
28 |
28 |
|
import android.widget.Spinner; |
29 |
29 |
|
|
|
30 |
+ |
import it.fedeloper.smartcharging.Service.EndPoint; |
30 |
31 |
|
import it.fedeloper.smartcharging.Service.HttpClient; |
31 |
32 |
|
import it.fedeloper.smartcharging.Manager.PrefsManager; |
32 |
33 |
|
import it.fedeloper.smartcharging.R; |
|
@@ -165,7 +166,7 @@ |
165 |
166 |
|
obj.put("username", user); |
166 |
167 |
|
obj.put("password", pass); |
167 |
168 |
|
|
168 |
|
- |
JSONObject resp = HttpClient.SendHttpPostAsync("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/registrazione_utente.php", obj); |
|
169 |
+ |
JSONObject resp = HttpClient.SendHttpPostAsync(EndPoint.MAIN_END_POINT + "/registrazione_utente.php", obj); |
169 |
170 |
|
Log.e("òfòsdkjdoigdofjgdl", "0"); |
170 |
171 |
|
int code = resp.getInt("return"); |
171 |
172 |
|
int id = resp.getInt("id"); |
|
@@ -239,7 +240,7 @@ |
239 |
240 |
|
|
240 |
241 |
|
|
241 |
242 |
|
Log.e("òfòsdkjdoigdofjgdl", "4a"); |
242 |
|
- |
JSONObject resp = HttpClient.SendHttpPostAsync("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/add_locale.php", obj); |
|
243 |
+ |
JSONObject resp = HttpClient.SendHttpPostAsync(EndPoint.MAIN_END_POINT + "/add_locale.php", obj); |
243 |
244 |
|
int code = resp.getInt("return"); |
244 |
245 |
|
Log.e("òfòsdkjdoigdofjgdl", "5a"); |
245 |
246 |
|
|
|
@@ -334,7 +335,7 @@ |
334 |
335 |
|
mpEntity.addPart("avatar_name", str_); |
335 |
336 |
|
mpEntity.addPart("token", new StringBody(PrefsManager.getToken(c))); |
336 |
337 |
|
Log.e("òfòsdkjdoigdofjgdl", "5b"); |
337 |
|
- |
JSONObject resp = HttpClient.SendHttpPostDirect("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/upload_avatar.php", mpEntity); |
|
338 |
+ |
JSONObject resp = HttpClient.SendHttpPostDirect(EndPoint.MAIN_END_POINT + "/upload_avatar.php", mpEntity); |
338 |
339 |
|
int id = resp.getInt("return"); |
339 |
340 |
|
switch (id) { |
340 |
341 |
|
case 0: { |
|
@@ -451,7 +452,7 @@ |
451 |
452 |
|
|
452 |
453 |
|
mpEntity.addPart("image_file", bab); |
453 |
454 |
|
|
454 |
|
- |
JSONObject resp = HttpClient.SendHttpPostDirect("http://svm19842.vps.tagadab.it:8084/smartcharging" + MainActivity.path + "/upload_image.php", mpEntity); |
|
455 |
+ |
JSONObject resp = HttpClient.SendHttpPostDirect(EndPoint.MAIN_END_POINT + "/upload_image.php", mpEntity); |
455 |
456 |
|
int id = resp.getInt("return"); |
456 |
457 |
|
switch (id) { |
457 |
458 |
|
case 0: { |