I am working in a registration module of an application, using a web service returning a generated TinyURL
corresponding to the new user.
This TinyUrl
gives to the user the access to the platform, by WebView
.
Problem :
The WebView
works very well with any URL but not with the TinyURL
. The TinyURL
works well on other browsers. Did I miss something?
Java definition and configuration of the WebView
:
WebView browser = (WebView) findViewById(R.id.wvBrowser);
WebSettings webSettings = browser.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setAllowContentAccess(true);
browser.setWebViewClient(new WebViewClient());
browser.loadUrl(myTinyUrl);
XML definition of the WebView
:
<WebView
android:id="@+id/wvBrowser"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
Thanks for your time and help. Every suggestion is welcome.
WebView
URLs should start with either http://
or https://
. A URL starting with www...
typically shows the standard Android 404 page.