diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-05 12:20:17 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-05 12:20:17 +1300 |
commit | 55ff767f6379f2f3cc14527e7a4b644d794885de (patch) | |
tree | 6f690e00004288bf84e3f563975671cb4e85a983 /app/src/main/java/org/traccar/manager/MainFragment.java | |
parent | 08a01ba7816ee09d3923e984fe30a9ee14594851 (diff) | |
download | etbsa-traccar-manager-android-55ff767f6379f2f3cc14527e7a4b644d794885de.tar.gz etbsa-traccar-manager-android-55ff767f6379f2f3cc14527e7a4b644d794885de.tar.bz2 etbsa-traccar-manager-android-55ff767f6379f2f3cc14527e7a4b644d794885de.zip |
Load correct server page
Diffstat (limited to 'app/src/main/java/org/traccar/manager/MainFragment.java')
-rw-r--r-- | app/src/main/java/org/traccar/manager/MainFragment.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/org/traccar/manager/MainFragment.java b/app/src/main/java/org/traccar/manager/MainFragment.java index cfa4827..5b2c5c5 100644 --- a/app/src/main/java/org/traccar/manager/MainFragment.java +++ b/app/src/main/java/org/traccar/manager/MainFragment.java @@ -18,6 +18,7 @@ package org.traccar.manager; import android.content.pm.ApplicationInfo; import android.os.Build; import android.os.Bundle; +import android.preference.PreferenceManager; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; @@ -40,7 +41,10 @@ public class MainFragment extends WebViewFragment { webSettings.setDomStorageEnabled(true); webSettings.setDatabaseEnabled(true); - getWebView().loadUrl("http://10.0.2.2:8082"); + String url = PreferenceManager.getDefaultSharedPreferences( + getActivity()).getString(MainActivity.PREFERENCE_URL, null); + + getWebView().loadUrl(url); } } |