Update osmo description

This commit is contained in:
vshcherb 2014-05-24 23:40:11 +02:00
parent 0497f21b1a
commit ec7d3fbb5a
5 changed files with 18 additions and 14 deletions

View file

@ -55,8 +55,12 @@
<string name="osmo_mode_off">Start OsMo session</string>
<string name="osmo_settings_debug">Debug information</string>
<string name="osmo_settings_descr">Configure monitoring settings and setup personal monitoring channel</string>
<string name="osmo_settings">OsMo (OpenStreetMap-Monitoring)</string>
<string name="osmo_plugin_description">OpenStreetMap-Monitoring - Advanced Live Monitoring with lots of features for remote control http://osmo.mobi</string>
<string name="osmo_settings">OsMo OpenStreetMap Monitoring (beta)</string>
<string name="osmo_plugin_description">OpenStreetMap-Monitoring - Advanced Live Monitoring. It provides possibilities to track other devices and be tracked.
Create anonymous groups, share each other location and comminucate. It has various settings for session tracking or permanent tracking.
Anonymous groups are limited for a number of days and for some feature, i.e. there is no remote control and group administrator.
Fully functional groups should be created on the website and only registered users have access to them.
Please read more on http://osmo.mobi.</string>
<string name="osmo_plugin_name">OsMo (Advanced Live Monitoring)</string>
<string name="osmo_settings">OsMo</string>
<string name="always_center_position_on_map">Display position always in center</string>

View file

@ -66,6 +66,9 @@ public abstract class OsmandPlugin {
OsmandRasterMapsPlugin rasterMapsPlugin = new OsmandRasterMapsPlugin(app);
installedPlugins.add(rasterMapsPlugin);
installedPlugins.add(new OsmandMonitoringPlugin(app));
installedPlugins.add(new OsMoPlugin(app));
installedPlugins.add(new AudioVideoNotesPlugin(app));
installedPlugins.add(new DistanceCalculatorPlugin(app));
installedPlugins.add(new AccessibilityPlugin(app));
if(!installPlugin(SRTM_PLUGIN_COMPONENT_PAID, SRTMPlugin.ID, app,
new SRTMPlugin(app, true))) {
@ -74,10 +77,7 @@ public abstract class OsmandPlugin {
}
installPlugin(PARKING_PLUGIN_COMPONENT, ParkingPositionPlugin.ID, app, new ParkingPositionPlugin(app));
installPlugin(OSMODROID_PLUGIN_COMPONENT, OsMoDroidPlugin.ID, app, new OsMoDroidPlugin(app));
installedPlugins.add(new DistanceCalculatorPlugin(app));
installedPlugins.add(new AudioVideoNotesPlugin(app));
installedPlugins.add(new OsmEditingPlugin(app));
installedPlugins.add(new OsMoPlugin(app));
installedPlugins.add(new OsmandDevelopmentPlugin(app));

View file

@ -77,8 +77,8 @@ public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
private String connectGroupImpl(OsMoGroup g) {
g.enabled = true;
String operation = "CONNECT_GROUP:" + g.groupId;
service.pushCommand("CONNECT_GROUP:" + g.groupId);
String operation = "GROUP_CONNECT:" + g.groupId;
service.pushCommand("GROUP_CONNECT:" + g.groupId);
return operation;
}
@ -337,6 +337,7 @@ public class OsMoGroups implements OsMoReactor, OsmoTrackerListener {
public String leaveGroup(OsMoGroup group) {
final String op = "GROUP_LEAVE:"+group.groupId;
storage.deleteGroup(group);
storage.save();
service.pushCommand(op);
if(group.isEnabled()) {
disconnectAllGroupUsers(group);

View file

@ -732,9 +732,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
long seconds = Math.max(0, (System.currentTimeMillis() - location.getTime()) / 1000);
String time = "";
if (seconds < 60) {
if(seconds > 15) {
seconds = (seconds / 5) * 5;
}
seconds = (seconds / 5) * 5;
time = seconds + " " + getString(R.string.seconds_ago);
} else if (seconds / 60 < 100) {
@ -749,10 +747,10 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
((Spannable) label.getText()).setSpan(
new ForegroundColorSpan(getResources().getColor(R.color.color_distance)), 0,
distance.length() - 1, 0);
labelTime.setText(time);
labelTime.setText(time, TextView.BufferType.SPANNABLE);
((Spannable) labelTime.getText()).setSpan(
new ForegroundColorSpan(getResources().getColor(seconds < 60 ? R.color.color_ok : R.color.color_unknown)), 0,
time.length() -1, 0);
time.length(), 0);
}
return row;

View file

@ -111,7 +111,7 @@ public class OsMoTracker implements OsMoSender, OsMoReactor {
if (location.getTime() - ltime > pref.get()) {
if(lastBufferLocation != null && (!lastBufferLocation.hasSpeed() || lastBufferLocation.getSpeed() < 1) &&
lastBufferLocation.distanceTo(location) < 40){
lastBufferLocation.distanceTo(location) < 20){
// ignores
return;
}
@ -131,9 +131,10 @@ public class OsMoTracker implements OsMoSender, OsMoReactor {
public void sendCoordinate(double lat, double lon) {
Location l = new Location("test");
l.setTime(System.currentTimeMillis());
l.setLatitude(lat);
l.setLongitude(lon);
bufferOfLocations.add(l);
sendCoordinate(l);
}