Fix slow upload by turning on hardware accelleration on the webview (#1173)

This commit is contained in:
Donovan Preston 2019-02-27 19:04:57 -05:00 committed by Danny Coates
parent beeb0d16c0
commit 5b03c64e8d
1 changed files with 2 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import android.webkit.WebView
import android.webkit.WebMessage
import android.util.Log
import android.util.Base64
import android.view.View
import android.webkit.ConsoleMessage
import android.webkit.JavascriptInterface
import android.webkit.WebChromeClient
@ -60,6 +61,7 @@ class MainActivity : AppCompatActivity(), AdvancedWebView.Listener {
mWebView!!.setListener(this, this)
mWebView!!.setWebChromeClient(LoggingWebChromeClient())
mWebView!!.addJavascriptInterface(WebAppInterface(this), "Android")
mWebView!!.setLayerType(View.LAYER_TYPE_HARDWARE, null);
val webSettings = mWebView!!.getSettings()
webSettings.setUserAgentString("Send Android")