Last Updated: September 09, 2019
·
3.192K
· igama

Phonegap and Android Stock Browser

Cordova/PhoneGap is a mobile development framework that enables developers to build mobile app using JS,HTML5 and CSS3. In a simple way, it's a application container that executes your HTML on the mobile device, in a full-screen browser (it's a very simple description, it allows more in reality).

What's important to know, it that the browser executed inside Phonegap is the native browser of the device:

  • Android : android.webkit.WebView
  • iOS : Objective-C UIWebView

Today, let's focus on Android, more precisely Android 4.X

With this latest version of Android, we have Chrome installed has the default browser, and many think that this is the Native Browser. This is wrong. Chrome is just another App installed, that is the default browser - but not the Native Browser.

For example:

input type="date"

Chrome will show a nice date-picker, the native webkit will pop up the keyboard (like a text field)

So, if you are testing your HTML5 app, remember that the result might be different from Chrome to the native webkit browser on Android devices.

To make it clear : Phonegap uses the Native Browser (Webkit) NOT Chrome

So, how can you test your HTML5 app outside of Phonegap, and see the same result? Install the Native Browser :D

Luckily, someone has extracted the source from AOSP 4.2 and created a APK , so you can installed it on your Android :

You should also find the stock browser apk for other version on XDA.

4 Responses
Add your response

The is a phonegap plugin:

https://github.com/phonegap/phonegap-plugins/tree/master/Android/DatePicker

There is an update version if you look online. I also have one that I might release soon, based on that.

over 1 year ago ·

Why not use Crosswalk Project? http://crosswalk-project.org/

over 1 year ago ·

@cevatkerim seems like a cool solution. There wasn't anything stable like it it when I wrote this.

over 1 year ago ·

Yeah, I discovered this recently and used it for a project I've been doing. It is incredible.

over 1 year ago ·