Does GeckoView for Android provide a Javascript interface/callback? - javascript

Since the WebView implementation on Android depends on the Android version and the manufacturer (Samsung and other manufacturers apply their own patches to it), I'd like to provide my own rendering engine for my Android app to reduce QA overhead and gain more confidence.
I tinkered around with both the Chrome engine (Chromium) and the Firefox engine (GeckoView) and integrated them into my Android app.
The GeckoView is very straight forward to integrate and so far it is working well. The only thing I am missing is a Javascript interface (bi-directional) similar to WebView's addJavascriptInterface.
Is there any way to get Javascript callbacks and to execute Javascript with GeckoView?

Related

Anyone have a custom webview implementation with flash i can use?

I know later versions of android webview don't have this ability. However, I know the pidgeon browser has its own implementation that allows flash to run.
I have been searching for a while and have not found much, but, does anyone know of a good AS3 and AS2 interpreter in javascript or a custom webview implementation that I can include in my app?
I was using phonegap, but I can do it in android studio if I could just find a good webview implementation with flash..
BTW working with the clubpenguinrewritten team to get a mobile app working while we rewrite the client.
EDIT: i tried with interpreting with swf2js.js but sadly it's as3 support is a little sad...

What js 'engine' does cordova use?

What JS 'engine' does Cordova use? Is it platform specific or is it one standard across all platforms? Meaning safari for iOS and chrome for Android, and possible IE standards for windows? Or a 'Cordova JS' engine across all platforms.
More specifically i read that it depends on the browser JS implementation for what sorting algorithm .sort() uses (Mozilla uses merge-sort). And i was considering using a merge-sort function i created or the standard .sort() function. (which could be a merge-sort anyway). The built in .sort() seems to be about 10ms quicker, or about 14% quicker.
Only reason I would want to use my merge-sort (slower) is because I know for sure it will be implemented exactly the same across iOS, windows, android, etc...
On Android it uses Android WebView which is based on Chromium, and uses the V8 JavaScript engine.
On iOS, as of iOS8 it uses the WKWebView which is based on Safari and uses the Nitro JavaScript engine.
On other platforms... well, whatever the native web view is.
Cordova is, at the end of the day, a native app with a web view embedded inside, and it uses the web browser component specific to the platform where the app is deployed.
If you wish to use another Web browser component is still possible. Take a look at Crosswalk.

Ionic.js or Appgyver Steroids for Angular MPA

I'm working on a somewhat large Angular.js CRM mobile app that uses Ionic JS Framework for the UI elements. I've been debugging using Ripple Phonegap Emulator. I've had literally no performance issues anywhere. The transitions are fast and fluid.
However, once I deployed using Phonegap Build and loaded the APK on an Android device, the performance was terrible. Ionic.js has known problems with Master/Detail transitions which can be worked around, but even apart from these screens (when I am not loading any external content), the app was very slow.
My question is, should I try to adopt Appgyver's Steroids Framework for my UI elements and transitions? Will Steroids offer faster performance and would it be worth the transition?
I'm targeting Android and iOS.
If you were to develop you app iOS first, I would definitely recommend the AppGyver platform. However, currently the Android runtime is going through a complete rework, with the new (currently called "Fresh") Android runtime not yet having any native UI features implemented, which would provide a noticeable boost in your app's performance.
That said, the first native UI features are being implemented in the next few releases, so depending on your deadlines, it could be worth the wait.
In the current state of Steroids, your iOS ionic app will be sped up dramatically. The more processes and complexity you add to any single page app, the slower and more cluttered it gets. DOM gets overpopulated, and things just chug. With Steroids for iOS, MPAs really solve that problem because each page is a separate OS process. All transitions are performed natively. That means they don't just look native, they actually are.
As for Android, the latest version of the Steroids Android client (Fresh Android) runs a Chromium 35 based WebView... that will beat the pants off builds you get get from anywhere else currently. Without the Chromium build, you're building for the platform standard browsers, which for a common phone like Samsung S3, you'r building Chrome 9 - yikes! No amount of javascript magic will help you there. In the coming 4 - 6 weeks, AppGyver is releasing MPA for Android. This will totally change the performance Android Hybrids ;)

webview for user interface in android

I was searching for how to use swf file in android and most of the answer suggested me to use webview and an simple html file.
Now i think We can easily put css and javascript files in asset folder and then we can use them in an html5 code.
Looking at the power of HTML5, This will make app development for a web designer very easy job !
I just want to know that is it good to use this approach to build a good user interface in android ? Are there any technical pros/cons behind it ? will i miss some features provided by android ?
There are a lot of frameworks that allow you to write native android applications using HTML/CSS/JavaScript only. Here some of them :
PhoneGap
Cordova
Titanium
I've never used any of them, so I can't say if it's good or bad idea to write android apps this way, but here you can find a good session about it HTML5 versus Android.
There are pros & cons of using cross platforms. As per my point of view you shouldn't go for loading of everything in WebView.
I still recommend you native app approach because of following points :
WebView is one of the UI control in Android SDK. So, it will have
limitation of memory size and working with CPU utilization. So, you
might face performance issues in some devices.
As you know in older era we were used to work with desktop apps and after that everything is shifted to web-application.
It was
possible only because our browser(s) gets more features for e.g. more
memory area, CPU access, threading, individual Processing (like
google chrome) etc...
in-short, web browsers gets more smart and get treated as separate application. Now a days web-application can have mostly similar
performance as desktop apps. So, everything is now shifted to
web-application development.
This era will come in to Mobile development in later stage. but currently we are in middle stage of Mobile development and Cross platform development. So until and unless Web-View control of any platform (iOS / Android) gets more powerful, we can not totally relay on that.
I Hope I explain it properly :)

Windows 8 Metro Interface - Is it IE10?

I've started playing with Windows 8 recently, and (as a web developer) I'm using JavaScript to build my Metro-style app.
I've learned how to use the debugging tools in VS Express 2012... but it occurs to me that the wrapping WebView (or whatever it's called) could simply be a stripped-down IE10.
I've never heard an explanation for what the HTML/JS engine is in this environment. Does anyone know what is happening under the hood?
This is correct. The rendering of Windows 8 WinRT apps built with XAML is handled by XAML and the ones being built using JS/HTML/CSS are rendering using an IE10's HTML rendering engine and IE10's JavaScript engine.
This is the main reason why IE10 is the only browser that currently implements CSS3 grid layout.
For debugging information on Windows Store Apps written using JavaScript/HTML/CSS:
There is a runtime DOM inspector provided by VS, there is Expression Blend where you can also run the app and there is the native VS debugger. However there is no tool like the IE10 developer tools. The intellitrace should give you enough networking information needed for debugging.
If you look in the Details tab of your Task Manager while you have a Windows 8 HTML/JS app running, you'll see a process called WWAHost.exe. That process is hosting the Trident (HTML/CSS) and Chakra (JavaScript) engines and running the app. The IE10 browser on your machine uses the same engine. There are a few differences between the way apps behave versus websites, however, and you can see those here.

Categories