Is it possible to access the Phonegap API in an iframe?

I am testing how to use a blackberry camera (5) with a phone application that has an iframe.

Basically, an iframe calls the camera, takes a picture, and returns the image in an iframe.

I do not know if it is possible to access the phone mail APIs from the iframe.

I put a simple test on a cross domain (with two pages capable of sending messages back and forth) on the simulator and it does not seem to work.

Any tips?

Thanks in advance.

+4
source share
1 answer

with an iframe, you are limited to the same orign policy - this means that you can only communicate between frames if they are downloaded from the same server (the event port is important here). A good amount can be found here: http://en.wikipedia.org/wiki/Same_origin_policy

From the point of view of telephone calls, it would be very bad if an html file that is not index.html could receive a camera. This would give all web pages the ability to take photos when you visit them using the phonegap application. So this is limited only to index.html (on android and iOs, don't know about Blackberry)

+3
source

All Articles