|
|
@@ -100,6 +100,7 @@ public class Network
|
|
|
public static String URL_NEWS = "https://ra.apexshipping.com/mobile_news.php";
|
|
|
public static String URL_LOCATIONS = "https://ra.apexshipping.com/mobile_news.php";
|
|
|
public static String URL_PUSH = "https://ra.apexshipping.com/main.php";
|
|
|
+ public static String URL_LOG = "https://ra.apexshipping.com/mobile_news.php";
|
|
|
|
|
|
private static HttpClient getNewHttpClient()
|
|
|
{
|
|
|
@@ -974,10 +975,10 @@ public class Network
|
|
|
return Network.RESULT_NET_ERROR;
|
|
|
}
|
|
|
|
|
|
- return parse_authinfo(jstr, name, password);
|
|
|
+ return parse_authinfo(jstr, name, password, parms);
|
|
|
}
|
|
|
|
|
|
- private static int parse_authinfo(String json, String user, String pass)
|
|
|
+ private static int parse_authinfo(String json, String user, String pass, Bundle parms)
|
|
|
{
|
|
|
String TAG = "net_dbg@parse_authinfo";
|
|
|
Log.d(TAG, json);
|
|
|
@@ -1008,6 +1009,7 @@ public class Network
|
|
|
|
|
|
JSONObject objheader = jsobj.getJSONObject("header");
|
|
|
String required_ver = objheader.getString("client_ver");
|
|
|
+ //String ver = objheader.getString("ver");
|
|
|
String current_ver = ApexTrackingApplication.get_instance()
|
|
|
.getPackageManager().getPackageInfo("com.usai.apex", 0).versionName;
|
|
|
if (current_ver.compareTo(required_ver) < 0)
|
|
|
@@ -1192,12 +1194,29 @@ public class Network
|
|
|
catch (JSONException e1)
|
|
|
{
|
|
|
// TODO Auto-generated catch block
|
|
|
+ ApexTrackingApplication.logout();
|
|
|
+
|
|
|
+
|
|
|
+ parms.putString("module_name", "Log");
|
|
|
+ parms.putString("action_type", "save");
|
|
|
+ parms.putString("return", json);
|
|
|
+
|
|
|
+ String jstr = getJson(Network.URL_LOG, parms);
|
|
|
+
|
|
|
e1.printStackTrace();
|
|
|
Log.d(TAG, "json is wrong");
|
|
|
}
|
|
|
catch (NameNotFoundException e)
|
|
|
{
|
|
|
// TODO Auto-generated catch block
|
|
|
+
|
|
|
+ ApexTrackingApplication.logout();
|
|
|
+
|
|
|
+
|
|
|
+ parms.putString("module_name", "Log");
|
|
|
+ parms.putString("action_type", "save");
|
|
|
+ parms.putString("return", json);
|
|
|
+ String jstr = getJson(Network.URL_LOG, parms);
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
finally
|