I am developing an android application where I need to load a URL which contains the Hindi fonts in web view.
I used the following code for this:
WebView webView = (WebView) findViewById(R.id.webView);
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setBuiltInZoomControls(true);
settings.setSupportZoom(true);
settings.setDefaultTextEncodingName("utf-8");
webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.loadUrl(url);
This code is working fine in most of the latest devices and showing Hindi contents properly. But in Android 2.2, 2.3 or other lower versions, it is showing boxes rather than Hindi charactors.
How can I support web view to be enabled for non-english test so my application can run on all devices.
Thanks in advance...