Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PhoneGap / Cordova allow your application to have a custom UI interface when using the device's camera?

Tags:

cordova

For example, native applications like Instagram have their own interface to take photos. Does PhoneGap / Cordova allow you to construct a similar interface?

like image 388
AndrewHenderson Avatar asked Dec 20 '12 00:12

AndrewHenderson


People also ask

What are the features of Cordova in mobile programming?

"Apache Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for crossplatform development, avoiding each mobile platform native development language.

What is difference between PhoneGap and Cordova?

A good way to understand the difference between Apache Cordova and Adobe PhoneGap is to think about how Apple has its Safari browser, but it is based on the open source WebKit engine. The same is true here: Cordova is the open source version of the framework, while PhoneGap is the Adobe-branded version.

What advantages does Cordova give when building mobile apps?

It helps to create native mobile applications that use HTML5, CSS, and JavaScript to operate on various devices. Cordova makes it easy to write code in one language and deploy it to multiple mobile devices and platforms.


1 Answers

The cordova 'core' has a camera.getPicture function that allows you to access the camera (across all platforms, iOS, Android ...). However, the UI for this action is platform specific. In other words, the way your application uses the camera will look different on each platform.

If you want to customise the camera experience you are going to have to write your own plugin. This involves writing a native implementation for each of the platforms you wish to cover, and also the JavaScript 'bindings' for your plugin.

At this point you start to loose many of the key advantages of using Cordova! Perhaps consider alternatives like Xamarin.

like image 100
ColinE Avatar answered Nov 11 '22 08:11

ColinE