Fix http scheme
This commit is contained in:
parent
0b1708cb17
commit
10873687ce
8 changed files with 48 additions and 51 deletions
|
@ -132,7 +132,7 @@
|
|||
<activity android:name="net.osmand.plus.osmo.SettingsOsMoActivity" android:configChanges="keyboardHidden|orientation"></activity>
|
||||
<activity android:name="net.osmand.plus.osmo.OsMoGroupsActivity">
|
||||
<intent-filter>
|
||||
<data android:scheme="http" android:host="osmo.mobi" />
|
||||
<data android:scheme="http" android:host="m.osmo.mobi" />
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE"></category>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingLeft="7dp"
|
||||
android:paddingRight="7dp"
|
||||
android:stretchColumns="1" >
|
||||
|
||||
<TableRow>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="3dp"
|
||||
android:paddingRight="3dp"
|
||||
android:paddingLeft="7dp"
|
||||
android:paddingRight="7dp"
|
||||
android:stretchColumns="1" >
|
||||
|
||||
<TableRow>
|
||||
|
|
|
@ -1,52 +1,47 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:orientation="vertical" >
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="7dp"
|
||||
android:paddingRight="7dp"
|
||||
android:stretchColumns="1" >
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="1" >
|
||||
<TableRow>
|
||||
|
||||
<TableRow>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/osmo_connect_to_device_name" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/osmo_connect_to_device_name" />
|
||||
<EditText
|
||||
android:id="@+id/Name"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/Name"
|
||||
android:layout_width="180dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="" >
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
</TableRow>
|
||||
|
||||
<requestFocus />
|
||||
</EditText>
|
||||
</TableRow>
|
||||
<TableRow
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
<TableRow
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/osmo_edit_color" >
|
||||
</TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/ColorSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" >
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp" >
|
||||
</Spinner>
|
||||
</TableRow>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/osmo_edit_color" >
|
||||
</TextView>
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/ColorSpinner"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp" >
|
||||
</Spinner>
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</TableLayout>
|
|
@ -629,6 +629,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
|
|||
private void createGroup() {
|
||||
if(osMoPlugin.getService().getRegisteredUserName() == null) {
|
||||
signin();
|
||||
return;
|
||||
}
|
||||
Builder builder = new AlertDialog.Builder(this);
|
||||
builder.setTitle(R.string.osmo_create_group);
|
||||
|
|
|
@ -24,7 +24,7 @@ public class OsMoIntentHandler extends AsyncTask<Intent, Void, String> {
|
|||
for (Intent intent : params) {
|
||||
String scheme = intent.getScheme();
|
||||
Uri data = intent.getData();
|
||||
if ("http".equals(scheme) && data.getHost().equals("osmo.mobi")) {
|
||||
if ("http".equals(scheme) && data.getHost().equals("m.osmo.mobi")) {
|
||||
String path = data.getPath();
|
||||
String lastPath = path.substring(path.lastIndexOf('/') + 1);
|
||||
if(lastPath.equals("login")) {
|
||||
|
|
|
@ -38,8 +38,9 @@ public class OsMoService implements OsMoReactor {
|
|||
private ConcurrentLinkedQueue<String> commands = new ConcurrentLinkedQueue<String>();
|
||||
private OsmandApplication app;
|
||||
private static final Log log = PlatformUtil.getLog(OsMoService.class);
|
||||
public static final String SHARE_TRACKER_URL = "http://osmo.mobi/connect?id=";
|
||||
public static final String SHARE_GROUP_URL = "http://osmo.mobi/join?id=";
|
||||
public static final String SHARE_TRACKER_URL = "http://m.osmo.mobi/connect?id=";
|
||||
public static final String SHARE_GROUP_URL = "http://m.osmo.mobi/join?id=";
|
||||
public static final String TRACK_URL = "http://test1342.osmo.mobi/u/";
|
||||
private String lastRegistrationError = null;
|
||||
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public class OsMoTracker implements OsMoReactor {
|
|||
if (!isEnabledTracker()) {
|
||||
return null;
|
||||
}
|
||||
return "http://test1342.osmo.mobi/u/" + sessionURL;
|
||||
return OsMoService.TRACK_URL + sessionURL;
|
||||
}
|
||||
|
||||
public boolean isEnabledTracker() {
|
||||
|
|
Loading…
Reference in a new issue