aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-07-27 09:12:42 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-07-27 09:12:42 -0700
commit05114053e3b4e13ec369113299c65ac1c250d613 (patch)
tree0143acc22f8eed08cb8710d39cb8323a27c2b750
parentd306bd42105bdb613f7760a89cd576c24c848da2 (diff)
downloadetbsa-traccar-manager-android-05114053e3b4e13ec369113299c65ac1c250d613.tar.gz
etbsa-traccar-manager-android-05114053e3b4e13ec369113299c65ac1c250d613.tar.bz2
etbsa-traccar-manager-android-05114053e3b4e13ec369113299c65ac1c250d613.zip
Handle redirects in the app
-rw-r--r--app/build.gradle4
-rw-r--r--app/src/main/java/org/traccar/manager/MainFragment.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/build.gradle b/app/build.gradle
index 1a17eab..5b4aeac 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -8,8 +8,8 @@ android {
applicationId 'org.traccar.manager'
minSdkVersion 19
targetSdkVersion 30
- versionCode 27
- versionName '2.16'
+ versionCode 28
+ versionName '2.17'
}
compileOptions {
diff --git a/app/src/main/java/org/traccar/manager/MainFragment.kt b/app/src/main/java/org/traccar/manager/MainFragment.kt
index 3f09e56..d5144f5 100644
--- a/app/src/main/java/org/traccar/manager/MainFragment.kt
+++ b/app/src/main/java/org/traccar/manager/MainFragment.kt
@@ -36,6 +36,7 @@ import android.webkit.JavascriptInterface
import android.webkit.ValueCallback
import android.webkit.WebChromeClient
import android.webkit.WebView
+import android.webkit.WebViewClient
import android.webkit.WebViewFragment
import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityCompat
@@ -68,6 +69,7 @@ class MainFragment : WebViewFragment() {
if ((activity.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) != 0) {
WebView.setWebContentsDebuggingEnabled(true)
}
+ webView.webViewClient = WebViewClient() // handle redirects in the app
webView.webChromeClient = webChromeClient
webView.addJavascriptInterface(AppInterface(), "appInterface")
val webSettings = webView.settings