Fix small bugs
This commit is contained in:
parent
4d7bc4a8a9
commit
b24b6a6add
5 changed files with 15 additions and 5 deletions
|
@ -39,7 +39,7 @@
|
||||||
<string name="osmo_session_not_available">Session not available, please check that \'Send locations\' is on.</string>
|
<string name="osmo_session_not_available">Session not available, please check that \'Send locations\' is on.</string>
|
||||||
<string name="osmo_share_session">Share session</string>
|
<string name="osmo_share_session">Share session</string>
|
||||||
<string name="osmo_session_id_share">Session url to track device (%1$s)</string>
|
<string name="osmo_session_id_share">Session url to track device (%1$s)</string>
|
||||||
<string name="osmo_tracker_id_share">In order to Connect to the target device %2$s, specify tracker id (%1$s)</string>
|
<string name="osmo_tracker_id_share">In order to Connect to the target device %2$s, click on the link %3$s or specify tracker id (%1$s)</string>
|
||||||
<string name="osmo_track_interval">Logging interval</string>
|
<string name="osmo_track_interval">Logging interval</string>
|
||||||
<string name="osmo_track_interval_descr">Choose time interval to send location</string>
|
<string name="osmo_track_interval_descr">Choose time interval to send location</string>
|
||||||
<string name="int_days">days</string>
|
<string name="int_days">days</string>
|
||||||
|
|
|
@ -590,7 +590,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
||||||
}
|
}
|
||||||
dlg.setTitle(getString(R.string.osmo_tracker_id));
|
dlg.setTitle(getString(R.string.osmo_tracker_id));
|
||||||
dlg.viewContent(trackerId);
|
dlg.viewContent(trackerId);
|
||||||
dlg.shareURLOrText(url, getString(R.string.osmo_tracker_id_share, trackerId, name), null);
|
dlg.shareURLOrText(url, getString(R.string.osmo_tracker_id_share, trackerId, name, url), null);
|
||||||
dlg.showDialog();
|
dlg.showDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class OsMoIntentHandler extends AsyncTask<Intent, Void, String> {
|
||||||
String pwd = data.getQueryParameter("p");
|
String pwd = data.getQueryParameter("p");
|
||||||
app.getSettings().OSMO_USER_NAME.set(user);
|
app.getSettings().OSMO_USER_NAME.set(user);
|
||||||
app.getSettings().OSMO_USER_PWD.set(pwd);
|
app.getSettings().OSMO_USER_PWD.set(pwd);
|
||||||
plugin.getService().reconnect();
|
plugin.getService().reconnectToServer();
|
||||||
} else if(schemeSpecific.equals("join")) {
|
} else if(schemeSpecific.equals("join")) {
|
||||||
String gid = data.getQueryParameter("id");
|
String gid = data.getQueryParameter("id");
|
||||||
String name = data.getQueryParameter("name");
|
String name = data.getQueryParameter("name");
|
||||||
|
@ -41,7 +41,11 @@ public class OsMoIntentHandler extends AsyncTask<Intent, Void, String> {
|
||||||
plugin.getGroups().joinGroup(gid, name, app.getSettings().OSMO_USER_NAME.get());
|
plugin.getGroups().joinGroup(gid, name, app.getSettings().OSMO_USER_NAME.get());
|
||||||
} else if(schemeSpecific.equals("connect")) {
|
} else if(schemeSpecific.equals("connect")) {
|
||||||
String gid = data.getQueryParameter("id");
|
String gid = data.getQueryParameter("id");
|
||||||
plugin.getGroups().addConnectedDevice(gid, gid, 0);
|
String name = data.getQueryParameter("name");
|
||||||
|
if(name == null) {
|
||||||
|
name = gid;
|
||||||
|
}
|
||||||
|
plugin.getGroups().addConnectedDevice(gid, name, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -272,6 +272,10 @@ public class OsMoService implements OsMoReactor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reconnect() {
|
public void reconnect() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reconnectToServer() {
|
||||||
if(thread != null) {
|
if(thread != null) {
|
||||||
thread.reconnect();
|
thread.reconnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ import android.app.AlertDialog;
|
||||||
import android.app.AlertDialog.Builder;
|
import android.app.AlertDialog.Builder;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.DialogInterface.OnClickListener;
|
import android.content.DialogInterface.OnClickListener;
|
||||||
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.CheckBoxPreference;
|
import android.preference.CheckBoxPreference;
|
||||||
import android.preference.Preference;
|
import android.preference.Preference;
|
||||||
|
@ -125,7 +126,8 @@ public class SettingsOsMoActivity extends SettingsBaseActivity {
|
||||||
dlg.setTitle(getString(R.string.osmo_tracker_id));
|
dlg.setTitle(getString(R.string.osmo_tracker_id));
|
||||||
dlg.setAction(getString(R.string.osmo_regenerate_login_ids), getRegenerateAction());
|
dlg.setAction(getString(R.string.osmo_regenerate_login_ids), getRegenerateAction());
|
||||||
dlg.viewContent(ci.trackerId);
|
dlg.viewContent(ci.trackerId);
|
||||||
dlg.shareURLOrText(ci.trackerId, getString(R.string.osmo_tracker_id_share, ci.trackerId, ""), null);
|
String url = "osmo://connect?id="+Uri.encode(ci.trackerId);
|
||||||
|
dlg.shareURLOrText(ci.trackerId, getString(R.string.osmo_tracker_id_share, ci.trackerId, "", url), null);
|
||||||
dlg.showDialog();
|
dlg.showDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue