0

I am having an AIR application which uses camera/microphone. Need to know if the user has selected "deny access" on IOS 8 ipad, then how the app will be able to detect?

Isha
  • 1
  • i dont know much about air application but facing same problem in iOS8 and here is an ans hope it will help http://stackoverflow.com/questions/24651863/how-to-know-that-application-have-camera-access-or-not-pragmatically-in-ios8 – Jageen Sep 10 '14 at 11:20
  • Thanks Jageen, for the reference link. – Isha Sep 11 '14 at 08:53

2 Answers2

0

The camera or the microphone are native functions so in AIR in order to access them you need native extensions. If you have a native extension already you should have a method like isSupported that returns true or false if the user allowed access to mic or camera. If you don't have a method like above you need to add one and use native code to check that user give permission for each platform in your case for iOS.

AlexGo
  • 487
  • 4
  • 19
  • I guess we need to add a native extension for this, as in AIR till now I don't see any method or check to tell whether user allowed or disallowed camera access. – Isha Sep 10 '14 at 11:56
  • Yes you need to add a native extension. One possible native extension can be found here https://github.com/freshplanet/ANE-ImagePicker – AlexGo Sep 10 '14 at 12:00
0

You can definitely access the microphone without an ANE via flash.media.Microphone.

I'm guessing getMicrophone() would return null if denied:

  mic = Microphone.getMicrophone();
  if (mic==null) {
    // No microphone found or access denied
  }

And this is very old (2009) but here's an example AIR project using the microphone you could reference.

Jeff Ward
  • 16,563
  • 6
  • 48
  • 57