How do i detect a camera now? where did media.hasSource go?

Its been awhile since i have used cameras in my apps.  but i used to be able to use:

[lua]

if media.hasSource( media.Camera ) then

[/lua]

but now when i look in the Docs…  i cant find that command anywhere.  So whats the new method called for detecting if a device has a camera…  i.e. A kindle HD+ or a iPad vs Nook’s 

Hi @team1,

I asked the engineers and they report that we still support this, as before. It appears that the documentation got taken down accidentally. I’m going to restore this as soon as I can.

Thanks,

Brent

 Hi @team1,

I asked the engineers and they report that we still support this, as before. It appears that the documentation got taken down accidentally. I’m going to restore this as soon as I can.

Thanks,

Brent

I did a test build of this on a Samsung Galaxy Tablet with a camera, and its not finding the camera.  I also did this with my Nook HD+ with a camera, and its not finding its camera either.  

However it does work on my iPad3

is this function only for IOS devices?

Hi @team1,

Just out of curiosity, I assume you enabled camera permission in the Android build?

Have a look at sample app “Media/Camera” that is included with the Corona Simulator.  It works on both iOS and Android devices.  It also shows you how to set up your “build.settings” file needed to make camera support work on Android.

Hi @team1,

I asked the engineers and they report that we still support this, as before. It appears that the documentation got taken down accidentally. I’m going to restore this as soon as I can.

Thanks,

Brent

 Hi @team1,

I asked the engineers and they report that we still support this, as before. It appears that the documentation got taken down accidentally. I’m going to restore this as soon as I can.

Thanks,

Brent

I did a test build of this on a Samsung Galaxy Tablet with a camera, and its not finding the camera.  I also did this with my Nook HD+ with a camera, and its not finding its camera either.  

However it does work on my iPad3

is this function only for IOS devices?

Hi @team1,

Just out of curiosity, I assume you enabled camera permission in the Android build?

Have a look at sample app “Media/Camera” that is included with the Corona Simulator.  It works on both iOS and Android devices.  It also shows you how to set up your “build.settings” file needed to make camera support work on Android.