Is there way to use smartphone camera in PhoneJS? - android-camera

I am trying to build test app with PhoneJS for Android. But I can not find a way how to use a camera.
Is it possible at all? Or better switch to PhoneGap?

From the Welcome to PhoneJS! article:
With Apache Cordova (or Adobe PhoneGap) you have the capability to compile those apps to real mobile apps that can access the native platform (the camera, accelerometer, GPS, etc)
PhoneJS does not have its own interface to the device hardware, but encourages the developer to use Cordova API. So the answer is: use PhoneGap to access the Camera.

Related

Can I use third party PhoneGap plugin on a web page using iOS Safari browser?

I am developing an application targeted only for iOS device(for now) using PhoneGap library and HTML5. This application is going to be only a web page accessed through iOS Safari browser. I am going to use certain features like accessing accelerometer, geolocation, contacts etc of iOS device using PhoneGap library.
Will I get access to all these features without installing anything on the device.
I want to understand how does PhoneGap get access to native features
of the device by just using JavaScript only?
I see there are several useful plugins written for PhoneGap library.
Can I simply use those plugins(js files) into my page without
installing anything on the device? E.g PhoneGap ChildBrowser plugin?
Will I get access to all these features without installing anything on the device.
You will have to build as a native ios app and install it to the device.
I want to understand how does PhoneGap get access to native features of the device by just using JavaScript only?
Phonegap provides a Javascript interface to access hardware features which are actually Objective-C functions. If you look at Phonegap source you'll see a lot of Objective-C code. So it's not only Javascript.
I see there are several useful plugins written for PhoneGap library. Can I simply use those plugins(js files) into my page without installing anything on the device? E.g PhoneGap ChildBrowser plugin?
No. They have to be inside an iOS app to be able to work.
It seems like what your after is a way to access the features of an APP only through the browser.
You can access some things using HTML5 e.g.:
Geo location http://html5demos.com/geo
Accelerometer http://menscher.com/teaching/woaa/examples/html5_accelerometer.html
Video Embedding http://www.w3schools.com/html5/html5_video.asp

Access mobile device camera from a grails application using jquery mobile

I have a grails application using jquery mobile. I am hoping to find some way to access the camera on the devices. I thought about using flash to grab the webcam but that obviously wont work on Apple devices.
Does anyone know of a way to do it and keep it all browser based? I am hoping that there is a plugin somewhere or maybe html5 has some magic in there that supports it.
I have researched this quite a bit (although about six months ago) and there is no API in the Mobile Safari browser for accessing a device's camera.
You have to have a native application for this type of functionality. For instance PhoneGap lets you use a device's camera: http://docs.phonegap.com/en/1.4.1/phonegap_media_capture_capture.md.html#Capture

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.

Can I get the Iphone/Android GPS location using the Corona SDK?

Can I get the Iphone/Android GPS location using the Corona SDK? I want to build an app and I am considering Corona, however I am unsure about whether it can access native features of the iphone and android.
I'm a bit confused as:
http://www.anscamobile.com/corona/faq/#who_is
: states :
Is there a way to call the native OS or link to an external library from Corona?
When you work with Corona, you can only access libraries written in Lua and limited to the features currently supported by the Corona SDK. You cannot link to libraries outside of Lua or access the iOS or Android APIs.
That said, we are constantly extending Corona's APIs to add new features and we welcome user input to guide future development. If you'd like to make suggestions on what we should add next, post it on our Features and Roadmap discussion forum.
Their website's home page is pretty clear: http://www.anscamobile.com/corona/
Native device features.
Use native iOS and Android features like multitouch, GPS, accelerometer, camera, Google Maps, WebKit, software keyboards, and more — it’s all available in Corona. Access social networks like Facebook and Openfeint and services like mobile analytics, with much more coming soon!

Access the a built-in camera from Safari installed on an iPhone, iPad, or iPod Touch?

Is there a genuine way to access the a built-in camera from Safari intalled on an iPhone, iPad, or iPod Touch?
By genuine I mean no hack, no workaround, no extra app to install.
There is no flash capability installed on the web browser for those devices and I need to enable my users to, with their permission, be able to use the camera as a web cam for a chatting site.
There is no way to do this. You need to use an API that allows you to access the camera, and those are only available for native applications, not a web application.