Activate XMPP location received only on traceur activated.
This commit is contained in:
parent
aaffa44e7f
commit
5246ab3595
|
|
@ -664,19 +664,23 @@ public class MainActivity extends AppCompatActivity implements IOrientationConsu
|
|||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (serviceGps.isTraceurActivated()) {
|
||||
MyLocation loc = serviceXmpp.getCurrentLocation();
|
||||
onNewLocation(loc);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (o.equals(ServiceXmpp.NOTIF_NEW_OBJECT)){
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (serviceGps.isTraceurActivated()) {
|
||||
MyLocation locObj = serviceXmpp.getLastObjectXmppLocation();
|
||||
WayPointLocation loc = serviceGps.addPointObjectTrail(locObj);
|
||||
GeoPoint gp = new GeoPoint(loc.getLatitude(), loc.getLongitude(), loc.getAltitude());
|
||||
addMarker(gp, loc.isFound());
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (o.equals(ServiceXmpp.NOTIF_START_TRAIL)){
|
||||
runOnUiThread(new Runnable() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue