question

Joshua Smith avatar image
Joshua Smith asked

API Level 19 ETA?

We've pretty much given up on the old WebView control in our Android apps. Its performance is just too awful, and its myriad bugs will probably never be fixed. So we're going to make the jump to 4.4 (API 19) as a requirement for our Android apps to get the new Chromium-derived web view. We'd rather deliver reliable apps on fewer devices than apps that don't work right on an out-of-date software platform. So, what about the Kindle Fire HDX? The hardware and user experience are top-notch, but it's stuck at API 17. Has there been any indication from Amazon whether they plan to support this in the future? If so, when? Message was edited by: Joshua Smith
fire tablet
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Joshua, We generally do not answer questions about future products, updates or services, which this falls under. However, I'm going to forward this feedback/suggestion to the concern team. Please stay tuned on Mobile App Distribution Portal or Blogs ( https://developer.amazon.com/blog/index.html) for any updates related to this. Meanwhile, Amazon Web View (AWV), that's a component library that you can embed in your app to create a hybrid mobile app. AWV is supported only on Kindle Fire HDX tablets and Kindle Fire HD tablets. Based on the Chromium open source project, AWV is a drop-in replacement for the standard Android WebView class and is backed by a modern web-rendering engine. This allows you to update existing apps or create new ones that use the latest web standards, as well as advanced technologies such as the V8 JavaScript engine. The web engine for AWV enables apps to display web content using newer features than the stock Android WebView class, and more reliably and consistently than older versions of Android which do not support many of the most recent web standards. For more information please refer https://developer.amazon.com/public/solutions/platforms/android-fireos/docs/building-and-testing-your-hybrid-app
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joshua Smith avatar image
Joshua Smith answered
Hey Sujoy, we've integrated AmazonWebView into our application, and we're really happy with it. We just have one snag that we cannot figure out. For other android devices, when we want to load a font that we have embedded as a resource we say: @font-face { font-family: PrivateFont; src: url("file:///android_asset/PrivateFont.ttf"); } This is not working with the AWV. How do we get the AWV to read a local font?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Joshua, This works with AWV. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); if (!sFactoryInit) { factory = AmazonWebKitFactories.getDefaultFactory(); if (factory.isRenderProcess(this)) { return; } factory.initialize(this); factory.getCookieManager().setAcceptCookie(true); sFactoryInit = true; } else { factory = AmazonWebKitFactories.getDefaultFactory(); } AmazonWebView mWebView = (AmazonWebView) findViewById(R.id.webView); factory.initializeWebView(mWebView, 0xFFFFFF, false, null); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setAllowFileAccessFromFileURLs(true); mWebView.getSettings().setPluginState(AmazonWebSettings.PluginState.ON); String url="file:///android_asset/test/fontTest.html"; System.out.println("mWebView = " + mWebView); mWebView.loadUrl(url); } In fontTest.html (see below posts)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hello World
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joshua Smith avatar image
Joshua Smith answered
Thanks! We'll take a look and figure out what's different from ours.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Joshua Smith avatar image
Joshua Smith answered
We've solved our issue. The CSS we were using was like this: src: local("SomeFont"), url("file:///android_asset/SomeFont.ttf"), ...other fallbacks... The first was for when we run this same code on iOS, where font resources "just work" and don't need all that url nonsense. What we found was that this messes up AWV, whereas it works just fine with API19's WebView on Android 4.4. I think I can probably work around the issue by simply changing the order to put the url() one first.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.