0

i have a Problem and i never user Android Sudio, can somebody help me with that Code?

package de.httpmh_grafikdesign_frankfurt.datumrechner;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {

    WebView wv;
    public void onBackPressed(){
        if (wv.canGoBack()){
            wv.goBack();
        }else{
            super.onBackPressed();
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);


        wv = (WebView) findViewById(R.id.wv);
        wv.getSettings().setJavaScriptEnabled(true);
        wv.setFocusable(true);
        wv.setFocusableInTouchMode(true);
        wv.getSettings().setRenderPriority(WebSettings.RenderPriority.HIGH);
        wv.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
        wv.getSettings().setDomStorageEnabled(true);
        wv.getSettings().setDatabaseEnabled(true);
        wv.getSettings().setAppCacheEnabled(true);
        wv.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
        wv.loadUrl("www.http://mh-grafikdesign-frankfurt.de/rechner/rechner.php");
        wv.setWebViewClient(new WebViewClient());


    }

}

I have my Website in Webview, my problem is the send button from whatsapp... how can i use it in webview?

net::ERR_UNKNOWN_URL_SCHEME 
Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
  • Possible duplicate of [Android WebView err\_unknown\_url\_scheme](https://stackoverflow.com/questions/41693263/android-webview-err-unknown-url-scheme) – Oliver Baumann Oct 25 '17 at 20:45

1 Answers1

0

This:

wv.loadUrl("www.http://mh-grafikdesign-frankfurt.de/rechner/rechner.php");

should be this:

wv.loadUrl("http://www.mh-grafikdesign-frankfurt.de/rechner/rechner.php");

Oliver Baumann
  • 2,209
  • 1
  • 10
  • 26
  • Oh thanks i dont saw this but my problem is something else the whatsapp share button Thats the Error: The webpage at whatsapp://send!test=my Text... could not be loaded because: net::ERR_UNKNOWN_URL_SCHEME – Michael Ünver Oct 25 '17 at 18:57
  • I flagged this question as duplicate of https://stackoverflow.com/questions/41693263/android-webview-err-unknown-url-scheme Please check the answer provided there, or use the search with appropriate tags – Oliver Baumann Oct 25 '17 at 20:46