Cordova navigator.device issue - javascript

I am using phonegap to build android application using JavaScript and HTML. I am trying to include audio and video features in my application. It is giving error capture of undefined for following code. Can anybody suggest me better way to handle audio and video feature?
navigator.device.capture.captureVideo(captureSuccess, captureError);

Which version of phonegap/cordova are you using for development?
You need to manually add the plugin for phonegap/cordova 3.+ onward.
Camera plugin link here
To manually add plugin.
To add the camera plugin use the below command
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

Related

Mobile app with Cordova

I'd like to create an android app using cordova but every tutos I watched use Android Studio, But the problem is that I'dont have minimal RAM to use it, so is someone has another alternative to replace A.S??

What is the difference between jQuery Mobile and PhoneGap

I am developing a mobile application using jquery mobile. But using this I can only be left with my .html, .js and .css files. And In order to make it run in Smartphones, I need to create a stand alone application using toolkits such as PhoneGap. So, what if I develop the whole application using phoneGap instead of using jQuery mobile. Is it possible?
jQuery Mobile is UI Framework for building web application and PhoneGap is a JavaScript framework which allows you to access native device functionality.
For example consider cases.
Case 1: You can develop mobile web app using Jquery Mobile.
Case 2: If you want to access device hardware for native device
functionality, you have Phone-gap in addition to your UI framework
that can be anything not just jQuery Mobile. You can package it for different platform (like iOS, Android etc) i.e., an Hybrid App. Approach depends on your requirement.
There are two different things:
phonegap is used to run web application as mobile app it start a web view and run your website
jquery mobile is framework for website compatibility for mobiles
for writing phonegap app you need to write website, therefore tou can use jquery mobile to write this website
Phonegap also give you api for native functionality - phonegap home page
https://cordova.apache.org/
PhoneGap or Cordova use to build application through your web application. it is separate framework. they doesn't compare
You may change UI through native platform code. but you should not change. Already you have web project. You can access to platform features(camera, wifi, connection).

Phonegap plugins not working

Phonegap plugins not working in Phonegap cordova-1.5.0 in iPhone. I added the plugin for date picker and one anohe plugin for making phonecall.
I used the plugins from
https://github.com/phonegap/phonegap-plugins/tree/master/iPhone.
Any one have any idea about this issue??
I just added the external JS file and called it directly. Do I need to make any changes in the plist or somewhere else. Can anyone tell me the steps to use the Phonegap Plugin in iPhone.?
Make sure that you are using the PhoneGap version that is compatible with the plugin structure (there were changes around 2.0, and Version 1.5 is pretty old). For the latest architecture, check here for details:
http://docs.phonegap.com/en/2.7.0/guide_plugin-development_index.md.html#Plugin%20Development%20Guide
For the older plugin architecture, check here:
http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-ios.html
Depending on the version, yes, you may need to edit the .plist files in your Xcode project. You also have to add the native files to the Xcode project, not just the JavaScript.

Android phonegap access jarfile

I'm just getting started using phonegap. I have some implemented libraries (jars) and I want to access them through javascript. I've been looking for an example to do this but I didn't find any. If you know any link or tutorial that would be great.
Here is a tutorial that shows how to use a Barcode Scanner library with a plugin for a PhoneGap app. (Note that it is written for PhoneGap 1.4.1, so you'd have to make appropriate namespace changes if you use a more recent PhoneGap/Cordova version.)

Writing apps for Apple platforms with Javascript

Does Apple allow iOS and Mac apps to use Javascript? Can someone give me examples of how to use it and the advantages and disadvantages?
If you're looking for a less techy solution, you could also use AppFurnace ( http://www.appfurnace.com ) to create JavaScript & HTML5 apps, packaged as native apps for iPhone and Android. We use PhoneGap (mentioned above), with an added drag-and-drop interface, enabling you to make your own apps.
You can use phonegap as a javascript, html and css wrapper in your ios app if you want to create a native app using html and javascript.
There's NimbleKit which allows you to make native apps using HTML and Javascript. Otherwise you can use a UIWebview which you can execute Javascript in. Look at the UIWebView documentation for more info.
There are tools to code your app in javascript and compile it into native code.
But if you want your app to load javascript code at runtime and run it, then see this for more details.

Categories

Resources