Stock Browser in 4.4 KitKat Cannot do Uploads on Websites - android

It seems that the basic <input type="file"> tag no longer functions when used inside the built-in Stock Android Web Browser on devices running Android 4.4 KitKat. The file selection modal simply does not appear.
I've tested this on actual devices and in emulators (local emulators and web-based emulator services like Browserstack) and none of them show me the file selection dialog when trying to select an item for upload.
It does work fine in Google Chrome on the same devices and it does seem to work in the next preview version of Android (L).
Is anyone else experiencing the same and have you found a workaround? This seems pretty basic but I'm not finding anyone talking about this issue.
Thank you!

Related

TWA Fullscreen PWA for Chrome and Samsung Internet

I'm trying to turn my PWA (Progressive web Application) into an TWA (Trusted Web Acitivity) App for Android. In the beginning everything was working fine, until a user reported a problem to me.
He was unable to open the App at all, so we checked to see what could be the cause. Turns out he hasn't installed Google Chrome and is using Samsung Internet instead.
Now I did manage to get the App working with Samsung Internet so far, but with Samsung Internet the address-bar still appears.
There are a few tutorials to setup your TWA for Chrome OR Samsung Internet, but how can I combine these two? I guess we shouldn't force the user to download Chrome first. I haven't found any articles concerning this issue, so I'd be grateful if someone can link me some.
When using a Trusted Web Activity with the recommended android-browser-helper library, the application will check for an installed browser that supports Trusted Web Activity, giving preference to the user's preferred browser.
If there's no browser that supports the protocol available, it will fall back to using a Custom Tab and, if Custom Tabs is not available, open the browser.
The library also contains a WebView fallback for developers who prefer that to the Custom Tab / browser. A demo on how to use the WebView fallback is available here.
Regarding the Samsung Internet browsers, it added support for Trusted Web Activity in November 2020 (version 13.0.2.9). Currently, Chrome, Samsung Internet, Firefox, Edge and others support Trusted Web Activity, covering the vast majority of users. An updated list of browser support is maintained here.
After tons of wasted time trying to figure this out myself and lots of research I found this article:
https://medium.com/#firt/google-play-store-now-open-for-progressive-web-apps-ec6f3c6ff3cc
Where you can find this info:
TWAs work only with Chrome today, but the API might be also cloned by other browsers, such as Samsung Internet, Edge or Firefox in the future.
*UPDATE 2/4: The TWA works over the Android Custom Tab protocol that other browsers are currently implementing, so if the user doesn’t have Chrome or has changed the default browser, another browser might take precedence and open the TWA with the PWA content. More testing is needed to understand how it works.
What happens if the user has an older version of Chrome and installs the app from the Play Store? In this case, your PWA will appear as a Chrome Custom Tab, not in a completely standalone mode.
What that means in a nutshell: TWA's are actually useless, as long as you need your App to be compatible with a lot of different devices (like most do). I also noticed many Apps don't work if you disable Chrome on your Device, why I guess these are using TWA's too (and getting bad reviews on PlayStore instead).
So what I did was to dump away everything I did with TWA, and simply started using Cordova instead. It would have been great to have something like TWA's working just that simple, but as long as it's not working without having Chrome installed, there's no point in using it at all.
And not having this stated on https://developers.google.com directly, but fuzzy and unclear, has probably ended in the waste of time of many dev's and/or tons of Users being unable to use some Apps.
I just checked my TWA and it is working for particular browsers as follows:
Chrome without any problem
Edge on first launch shows message running in edge, later works as expected
Opera working as expected
Samsung browser - asks to open in browser, but works fine in browser. hides address bar if opened in browser
Firefox(once a best browser around ...) asks to open in browser, if opened it still shows address bar

Page not rendered properly on browser called Internet (LG)

I built a website in Rails and it is rendered properly on most major browsers, on computer and phone. However, on my phone (an LG G3) which has a browser called Internet (version 5.2.34b13) I can't open navbar, I can't sign up and some other small features are not there. On the same phone it works fine with Chrome.
Has anybody had any similar problems? How can I fix this?
Jello Al-Josh!
It sounds to me like it is a cross-browser issue and has nothing to do with Rails. I'd recommend you to use the Autoprefixer gem ( https://github.com/ai/autoprefixer-rails ) to sort out CSS vendor prefixes issues.

why filechooser would work for chrome android 4.4 while webview doesn't?

according to Google, filechooser is taken off and no longer working on android 4.4, but why would chrome still working? I have a device that is running android 4.4. My app has a webview, and inside of this webview I have a button which allow user to upload photo. It was working fine until 4.4. my question is that how come Chrome is able to pick up filechooser event but mine is not while both apps(chrome and mine) are running on the same device. what did google do differently? Thanks!
There was a bug which occurred in KitKat which broke the file chooser for both Chrome (https://code.google.com/p/chromium/issues/detail?id=278640) and I believe the WebView was affected by the same problem.
WebView only ever supported a file chooser through a private API (i.e. an API which developers shouldn't use or rely on), which was removed in KitKat.
The WebView team are aware of the number of developers wanting this.
As Kinlan has stated, Chrome for Android doesn't use a WebView.

Testing Android browser without the emulator?

I'm working on a javascript framework that generates webkit browser pages which emulate a native app for Android & iPhone.
I'm using an iPhone emulator (iBBPhone -- very nice) to see how my pages would look on the iPhone and iPad. I was curious if there was something besides the Android SDK phone emulator that would simulate the Android browsing experience. I'm using desktop Google Chrome right now as a "pretend Android" browser but I'm not sure how alike they really are.
The Android emulator that ships with the SDK is a bit too slow to fire up on my box to be of great use in what I'm doing (even when starting up a saved image), and I was curious if there was anything else out there that simulates Android browsing. Thanks!
I think this Firefox plugin will let you display the site as it would show up in several different types of browsers. I know it supports iPhone so I imagine it will do Android as well. This page also talks about some other Firefox plug-ins that may be useful to you.
Chrome has a nice add-on named Ripple that does the job nicely I've found. http://ripple.tinyhippos.com/
These guys pretend to meet this need. Might be a good idea to check it out.
http://www.browserstack.com/mobile-browser-emulator

what audio formats are supported by the android browser?

What audio formats can be played using the html5 'audio' tag in the android browser? Does anyone know where to find official specs on what the android browser supports and not?
For the record, the android media formats page does not seem to cover this - I have soundfiles (3gp) playing fine in a native app, but they won't play in my webapp.
The webkit docs also do not seem to help. My soundfiles play fine in my webapp on iphone, so that version of webkit handles them fine. Shouldn't the android browser have some official documentation somewhere?
Probably there should be official documentation. If you want to test it, why not make a web page on some domain you have access to, with links to all of the different sound files you can think of, and point your browser at it.
After some testing, I've concluded that support for the HTML5 audio element is broken in Android 2.1. Details of my testing can be found on my blog. I tested on an HTC Desire running Android 2.1 and HTC Sense, whereas Amos confirmed the same error on his HTC Heor running a custom 2.1 ROM (thanks, Amos!). If anyone will try the testpage in different configurations and report back either here or on my blog, I will update with any new information.

Categories

Resources