Compare commits

...

4 Commits

3 changed files with 51 additions and 57 deletions

View File

@ -255,13 +255,12 @@ public abstract class AbstractSDParentActivity extends TabActivity {
return res; return res;
} }
public boolean getAlarms(long userID) public boolean getAlarms(long userID) {
{ if (tcp == null)
if(tcp == null)
return false; return false;
boolean res = tcp.Write("0.0", "#27#" + userID + "#"); boolean res = tcp.Write("0.0", "#27#" + userID + "#");
if(res) if (res)
SM.Debug("Message [GetAlarms] sent to app server"); SM.Debug("Message [GetAlarms] sent to app server");
else else
SM.Debug("Could not send message [GetAlarms]!!"); SM.Debug("Could not send message [GetAlarms]!!");

View File

@ -42,7 +42,6 @@ public class GoogleMapsInfoBubble implements GoogleMap.InfoWindowAdapter {
public GoogleMapsInfoBubble(LayoutInflater layoutInflater, Context context) { public GoogleMapsInfoBubble(LayoutInflater layoutInflater, Context context) {
isLiveTab = false; isLiveTab = false;
this.context = context; this.context = context;
// this.superVehHash = vehicles;
mWindow = layoutInflater.inflate(R.layout.map_marker_info_bubble, null); mWindow = layoutInflater.inflate(R.layout.map_marker_info_bubble, null);
} }
@ -73,7 +72,7 @@ public class GoogleMapsInfoBubble implements GoogleMap.InfoWindowAdapter {
} }
} else { } else {
try { try {
position = Integer.getInteger(marker.getTitle()); position = Integer.parseInt(marker.getTitle());
} catch (Exception e) { } catch (Exception e) {
Log.v(TAG, "Unable to parse Google Maps Info Bubble title on History"); Log.v(TAG, "Unable to parse Google Maps Info Bubble title on History");
} }

View File

@ -1688,13 +1688,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
SM.Debug("Unit imei:" + tempArr[0]); SM.Debug("Unit imei:" + tempArr[0]);
String unitIMEI = tempArr[0]; String unitIMEI = tempArr[0];
//list for SMS
if (AppParams.crtTab == AppParams.Tabs.alarms) {
SM.Debug("currentActivity instanceof AlarmActivity - newSMS | " + tempArr[0] + " | " + tempArr[1]);
getAlarms(AppParams.USERID);
}
// if tab is not TextTab
if (tabHost.getCurrentTab() != 5) {
// change Visual Elements // change Visual Elements
setImei(unitIMEI); setImei(unitIMEI);
switch (msg.opCode) { switch (msg.opCode) {
@ -1745,7 +1739,10 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
} }
} }
} }
}
//list for SMS
if (AppParams.crtTab == AppParams.Tabs.alarms)
getAlarms(AppParams.USERID);
} }
@Override @Override
@ -2052,7 +2049,6 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
.setAutoCancel(true) .setAutoCancel(true)
.setContentIntent(pendingIntent); .setContentIntent(pendingIntent);
Log.v("test111", "test");
NotificationManagerCompat managerCompat = NotificationManagerCompat.from(context); NotificationManagerCompat managerCompat = NotificationManagerCompat.from(context);
managerCompat.notify(icon, builder.build()); managerCompat.notify(icon, builder.build());
} }