Is space allowed as part of the file path?

My question is related to android_asset, which does not work on Honeycomb?

Is it allowed to have spaces in the file name of the html page file located in the resource folder?

For example: Is the following legal?

mWebView = (WebView) findViewById(R.id.webView1); mWebView.loadUrl("file:///android_asset/Help File/helpfile.html"); 

Is there any other solution than renaming the Help File directory so that there are no spaces in it?

TIA.

0
source share
2 answers

Use% 20 instead of space. The URL must be encoded in the URL.

0
source

Use a URI that will solve such problems.

 mWebView.loadUrl(new URI("file:///android_asset/Help File/helpfile.html")) 
0
source

All Articles