URL with characters in Webview Android

Asked

Viewed 49 times

0

I have to display a page on an android webview using a URL returned by the server. The problem is at the end of the URL where there are two dots (..) but when I pass the string to the webview these dots are ignored and it is not possible to open load the contents. Any suggestions on how to proceed? Exemplifying:

wvBillet = (WebView) findViewById(R.id.wb_billet);
 WebSettings ws = wvBillet.getSettings();
 ws.setJavaScriptEnabled(true);
 ws.setSupportZoom(false);
 ws.setTextZoom(0);
 wvBillet.loadUrl(urlbillet);

The URL in question would look like this:

https://homolog.bancoqualquer.com.br/api/bancoqualquer?token=aUxselZSMFM0c29seHdhdndoNm9TcVhBL0UxN1ptdmZIVmRCU3FYRHA1SzhMN2I4c3ZjN3dlV0tK..

When I call the webview and pass the URL it reads even before the .. - Does anyone have any suggestions of what can be done?

  • Can you show us the URL, or piece of your code that is ignoring this URL? Edit your own post to show.

  • The browser itself (in my case Firefox) ignores the colon.

  • @ramaral even in my machine’s browser ends up being necessary the two points but the case here is that I need to display it directly in the webview (inside the app).

  • Try exchanging points for %46%46

  • @ramaral Unfortunately even using your suggestion there has been no progress yet.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.