0

I Have an issue after publish app on playstore

Your app includes a WebView that is vulnerable to cross app scripting. Please see this Google Help >Center article for details.

Vulnerable classes:

com.all.in.one.shopping.app.india.activity.WebViewActivity->setupWebView

And this is my webViewActivity Code-

class WebViewActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_web_view)

    setupWebView()
}

private fun setupWebView() {
    webViewFromActivity.loadUrl(intent.getStringExtra(AppConstants.WV_URL))
    webViewFromActivity.webViewClient = mWebViewClient
    webViewFromActivity.settings.javaScriptEnabled = true
    webViewFromActivity.settings.domStorageEnabled = true
    webViewFromActivity.requestFocus(View.FOCUS_DOWN)
}

private val mWebViewClient = object : WebViewClient() {
    override fun onPageStarted(view: WebView, url: String?, favicon: Bitmap?) {
        progressBar.visibility = View.VISIBLE
        super.onPageStarted(view, url, favicon)

    }

    override fun shouldOverrideUrlLoading(view: WebView, url: String?): Boolean {
        view.loadUrl(url)
        return true
    }

    override fun onPageFinished(view: WebView, url: String) {
        progressBar.visibility = View.GONE
        super.onPageFinished(view, url)
    }
2
  • is your app rejected by playstore or its just a warning ? Commented Dec 7, 2019 at 6:07
  • only warning showing on playstore @Swayanfjit Commented Dec 7, 2019 at 6:20

2 Answers 2

1

Try adding the following in your manifest

<meta-data android:name="android.webkit.WebView.EnableSafeBrowsing"
android:value="true" />
Sign up to request clarification or add additional context in comments.

1 Comment

This is enabled by default on all WebViews starting WebView release 66.
0

It's because of this:

webViewFromActivity.settings.javaScriptEnabled = true

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.