In my app, I show an external HTML site in either a CustomTabsIntent or a in a WebView:
if (customTabsIntent != null) customTabsIntent.launchUrl(this, Uri.parse("http://some.where.com/site.html"));
else startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://some.where.com/site.html")));
But the style of that HTML is already updated, but my smartphone shows the old style (old fonts etc.).
In the *.html file there is a *.css referenced:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href='https://my.site.com/assets/css/style.css' rel='stylesheet' type='text/css'>
</head>
And in that *.css file, there is an individual font referenced; e.g.:
@font-face {
font-family: 'MyFontRegular';
src: url('https://www.openfont.org/assets/mail/fonts/MyFontWeb-Regular.woff') format('woff'),
url('https://www.openfont.org/assets/mail/fonts/MyFontWeb-Regular.eot') format('embedded-opentype');
}
As I said, the chrome browser in my smartphone does not show the referenced fonts, because it cuts the http:// or https:// off. When I prepend that scheme manually into the address bar, the proper style is being shown.
How can I force the https:// scheme in the address field in my android browser, when it was called from my android app ?