Camera Tutorial: Introduction

Opt In Image
Early bird offer on the ANE eBooks

 

Buy any Easy Native Extensions 2nd Edition package and get our $99 iOS + Android ANE Template completely free before the end of June 2015.

 

 

  • step-by-step guide to making your iOS extension in under an hour
  • library for data conversion between ActionScript and native code
  • tutorials
  • infographics
  • code included

At the end of this tutorial you will have

  • A native extension for AIR that connects with the native camera and captures frames from it.
  • A test app that uses the native extension and can help you test and debug its code.

Camera Test App GUI

Total time

I’ve broken down the tutorial into parts, each of which should take between 5 and 20 minutes to implement.

I expect the full tutorial to take you between an hour and a half and two hours in total. You’ve got to love software project estimates. :) If you’ve completed the whole tutorial, leave a comment and let me know whether my estimate was way off base.

How is this tutorial structured?

Parts 1-3 set up the infrastructure for your ANE and test app:

In parts 4-8 you get your hands dirty with native code and learn about AVFoundation, some Objective-C and passing pixel data between Objective-C and ActionScript:

Part 9 is the moment of truth, where you see the results of your labor:

  • Part 9: Test it [coming soon]

And in part 10 we discuss how you can use the code you have produced as a base for other ANEs and projects:

  • Pat 10: The possibilities are endless… [coming soon]

Why Flex and not just ActionScript mobile?
The Flex SDK offers a way of quickly putting together the UI of your app. In this tutorial I want us to focus on the tricky bits: native code for controlling the camera, rather than building UI from Sprites. You can replicate the idea in Flash, if your app must be ActionScript-only.
Wait, want more features and Android support?

Check out the DiaDraw Camera Driver ANE.

Comments

Trackbacks

  1. […] My guinea pig for this example is a Native Camera Extension for iOS: […]

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">