Adobe AIR

BlackBerry 10 AIR Camera Flash ANE

flash_bulb

With BlackBerry having recently announced the death of AIR, including the planned removal of applications from user phones, I thought I would leave a small present for other BlackBerry AIR developers on their final build months.

Freeware & Open Source : BlackBerry 10 ANE for AIR, Access to Camera Flash

What it does: 

This allows AIR developers to turn the phones flash on and off.

How to setup an ANE in AIR:

Step 1:  Launch Adobe Flash Builder

Step 2:  Drag and Drop the ANE to your projects SRC folder

Step 3:  Open bardescriptor.xml and add the following to the permissions section:

  • <permission system=“true”>run_air_native</permission>

Step 4:  Right click on your project and select properties

Step 5:  Select ActionScript Build Path, Native Extensions tab, press Add ANE, and browse to your projects SRC folder to pick the file CameraFlashBB10_16.ane

Step 6:  Select ActionScript Build Packaging and open BlackBerry

Step 7:  Select Native Extensions, scroll to the right, and check Package beside the ANE above

How to use the ANE:

Now it can be referenced like any object.

  • import com.FileArchiveHaven.CameraFlash.CameraFlashBB10;
  • private var flashANE:CameraFlashBB10 = new CameraFlashBB10();

Available Commands:

  • flashANE.myver – Returns a string with the version of the ANE
  • flashANE.flashOn(); – Returns a Number that is the flash instance
  • flashAne.flashOff(Number); – Turns off a flash instance with the flash instance specified

ANE, Sample Project, and BAR

Download the Package

 

(2918)

Leave a Reply

Your email address will not be published. Required fields are marked *

ERROR: si-captcha.php plugin: GD image support not detected in PHP!

Contact your web host and ask them to enable GD image support for PHP.

ERROR: si-captcha.php plugin: imagepng function not detected in PHP!

Contact your web host and ask them to enable imagepng for PHP.

This site uses Akismet to reduce spam. Learn how your comment data is processed.