What browser engine does Capacitor use - capacitor

We have some issues with elements that are rendered differently across devices.
So can this be because they use a different browser engine?
Is it a browser engine that the device provides or is it packed inside capacitor, and is there a way to set the version of this engine so every device uses the same engine?

The Capacitor documentation seems really good. According to those docs, the browser engine varies by environment.
On iOS, it uses Apple's WKWebView (Safari-like).
On Android, it uses an Android WebView with Chrome 60 or higher.
On Web, of course, it's up to the end user what gets used.

Related

Using an unsupported API in Android Wear

I'm really keen to develop a web browser application for Android Wear devices. To make such application I need a WebView object, but the major problem is that Google has made the android.webkit API unavailable in that OS.
Since Android is open-source, is it technically possible to manually include the needed libraries, by coping them from the android source code on GitHub into my project? Are they going to work like as in a normal Android device, and is it legal?
Here is the link to the API I'd like to use.
Developing a browser based on WebView is not a good idea anyway. Although historically Android Browser was based on WebView, it had to use a lot of hidden APIs in order to work. All more or less functional browser apps based on WebView have to do the same, which makes them fragile. Also, the resulting browser app will not be as secure as a real multi-process web browser.
A better idea is to take Chromium and build it using Wear SDK. And there is already one built this way.
You don't have access to a complete source for Android Wear to build a complete image.

Building app, mobile web app and desktop web app using Ionic

We will develop an app that we would like to distribute in through the following channels:
Android and iOS apps through Google Play and iTunes (the app will
use notifications extensively and presence in Google Play and App store is required)
Web app to run in web browsers on mobile devices
Web app to run in web browsers on laptop and desktop computers. We would like to support Chrome, Internet Explorer (starting from IE9),
Firefox and Safari browsers.
Our understanding is that Ionic is developed targeting primarily 1. and that the web apps in 2. and 3. above are not really what Ionic is intended for. We have looked around to try to understand if Ionic likely works for 2. and 3. and also made some quick tests ourselves.
From one of the links at the end: "Your webapp will run in desktop browsers yes, as it is made of html, css and javascript. The phonegap specific javascript calls (accelerometer, compass, file, etc) won't. Basically, if you stick to standard yes you will be able to port relatively easily your app to most browser, the job at this point being mostly a work of theming."
From another one: "I do know that FireFox is simply not supported. I don't know how well Ionic works in IE X."
To try it out we have built a limited version of our app in Ionic. From what we can see the app works for 1, 2 and 3. For example, it runs without issues on FireFox that is mentioned as not supported in the quote above. This means that to us it looks like the first quote saying that the web app will work in desktop browsers is correct.
I understand that this is a fairly generic question and might be hard to answer, but since we have found contradicting information when looking we are trying to understand more before making a decision.
Any feedback would be appreciated.
Thanks,
Markus
Is it a good idea to use ionic to build mobile web version of a website?
Can Ionic Framework run in desktop web browser like Chrome, Mozilla, IE9+?
http://forum.ionicframework.com/t/ionic-components-on-ie/1826
Phonegap web app in regular desktop browsers
http://ionicframework.com/docs/overview/#css-sass
Ionic is tested for mobile only. Internet Explorer for example is not tested and does not properly handle a number of features in Ionic. Desktop browsers act differently than mobile browsers.
Ionic is focused on building native/hybrid mobile apps rather than
mobile websites.
As such, our browser support tends to be whatever Web View API is
available to native apps on a given platform. For Ionic 1.1.0
"xenon-xerus", that means UIWebView for iOS 7+, and Android 4.1 and
up. Windows Phone and FirefoxOS support is on our roadmap.
If it's cheaper for you to test everything on all different desktop browsers than to develop a version for it sharing the same controllers and services --- go ahead but it won't come "out of the box".
Also, I recommend looking at Electron to build desktop apps from webapps.
ionic is targting mobile apps only , but you can develop your desktop app using node webkit and angular material for example and share some code between your apps

What rendering engine does Ionic use?

Can't seem to find which rendering engine the mobile app wrapper Ionic uses. Is it Webkit?
Ionic's Cordova is essentially opening a webview from the native app. That means the rendering engine is different on every device. For example, on the latest devices, Android uses webkit, and iOS uses WkWebView. That's where you have to be careful. Some styling like css-animation behaves differently.
To add to the other answer:
If you wish to have the same experience across the platform, you could always resolve to using the crosswalk plugin. On android, it basically installs the webkit and uses it instead of the native webview, so that it will always display the same across devices. On iOS, there is a similar version for the iOS8 and up to use the new wkWebView and not the old uiwebview. Just google cordova crosswalk and it should come up.

Mobile Web or Mobile App?

We are building a webapp combining dojo and couple of other GIS related frameworks to render map and other data to browser. It works perfectly fine in desktop browser (firefox, chrome). However when we fire it up an andriod emulator, the performance is very slow. we have increased the memory to about 2 GB and VM around 256mb for the emulator.
What could the problem be?
Is it better to develop a seperate android app or continue this as a mobile web itself?
Basically your question relies on the same effect as to what happened to facebook.
Their original "app" was based on HTML5 development and was slow as molasses. They realized that if they went native - their performance would increase. In reality it was slapping on rocket launchers.
It would be the same for android and android apps.
If you have built it as a web app it will be pulling request and then rendering it as html as if it was an open browser rather than using the native map applications built into the system.
If you are savvy enough and your code is more JS than anything with the dojo framework look into the Titanium Framework Accelerator to translate your native web code into a native app. Though tweaking will be needed in order to call native API map protocols
http://www.appcelerator.com/platform/titanium-platform/
Android simulator is slow, it's better if you test in real devices.
Anyway if performance is a must, you should develop a native app. HTML5 is improving but in some situations you need native code. Or if your code is mainly Javascript, there are some javascript compilers to generate native code and improve the performance.

How to gain direct access to the hardware capabilities of mobile devices from mobile browsers

We are developing web browser application for mobile phones and I am trying to figure out a way that I can gain access to the camera and take a photo and then upload it to the internet. But so far what I was suggested is to use phonegap and create native application. Phonegap is fine but it is not what I am looking for because my client wants to design forms and these html forms somehow will be able to trigger the camera and take photo and upload it to a server. Do you think developing a native API for every platform and having access to its functions from the web browsers is possible? What your suggestion would be?
(Note: My customer only want application that can run on mobile web browsers no native application runs on I-Phone, windows mobile, Blackberry and Android)
Thanks a lot...
Web apps (not wrapped in native code as Kumar details) cannot access all device hardware and sensors. Location support is available on iOS and Android, but camera access is only available on Android (via JavaScript). Similarly, device motion APIs are not accessible on Android, but are on iOS.
As you can see, support is sketchy and if you are truly looking to use such features, you are better off (and in many cases, realistically looking at) writing native apps for each platform you intend to support.
HTML5 is not yet at the point where it can replace native apps. It can do some of the things that native apps can, but even then performance is suboptimal. Currently, native apps may be more difficult and time-consuming, but they are necessary.
Calling android native APIs from javascript functions of embedded WebView
Use JS to call Java code which will in-turn call the Camera API or whatever else you are looking for.
It's not going to be possible to do it on iPhone, the only known way of accessing the camera is through the Cocoa layer.