Beginning Mobile Development with Flash Builder 4.6 – Camera API Troubleshooting

I have been running into simple problems during my Flash Builder 4.6 mobile development research and I want to add my voice to the Interwebs!

Flash Builder 4.6 Camera API:  

NOTE: I am only posting the musings of my problems, if you want to learn how this all works, go check this out:

Michael Chaize: Android, AIR, and the Camera
Christian Cantrell: How to Use CameraUI in a Cross-platform Way
Uploading images from CameraRoll and CameraUI

My Goal for this project: To build a universal application that would use the camera in either the iOS and Android platforms.

In order to access the camera in any mobile device you will be working with the CameraUI class used in the AIR 2.5 runtime.  My first problem?  I didn’t read the introductory paragraphs in the liveDocs… they describe everything that you must adhere to in order to have a smooth experience.

A couple of things that are obvious to me now, but weren’t clear when I started:

1.  Know what a Device Profile is .  Adobe does a perfect job of explaining why you can’t test the camera in certain environments.  Go learn why.  If you understand profiles, then you will know what your limitations are right from the start.  Because I didn’t know, I lost a lot of time trying to get a laptop operating like a native app would.

2. You can’t access an android camera if the device doesn’t have a memory card.  This drove me crazy because my iPhone camera responded quickly and the android camera didn’t even activate.  I had to /facepalm when I re-read the liveDocs again only to find that you must have a memory card to access the camera.  I am on a loaner android phone so it didn’t make sense until I read the fine print.

3. If you want to add permissions or change settings after you have created your app, you will have to edit the Adobe AIR Application Descriptor File.   I found that I didn’t have the correct permissions for my android device and didn’t see an easy way out of my problem.  After some reading I found that I could edit the descriptor file in my project.  The actual file is located in the SRC root and tt has the same name as your app.  The file will usually look like this “YourAppName-app.xml” Make sure you don’t edit the descriptor file in the bin folder as that is just a copy and won’t have any effect on future builds.

I am going to be posting more as I will inevitably have more issues along the way.  Thanks for reading!

 

 

 

 

 

 

 

Blizzcon 2011 SC2 Portrait and Decals revealed

Since the new patch was released (Patch 1.4.2) the new Blizzcon 2011 Starcraft 2 Portrait and Decals were no longer “Classified.”

The portrait is named “PanTerran Marine” check it out:

Blizzcon 2011 portrait

PanTerran Marine

 

 

 

 

 

 

The decals follow the same Panda theme and have slight variations between each race:

Blizzcon 2011 Terran Decal

Terran Decal

Protoss Decal

Blizzcon 2011 Zerg Decal

Zerg Decal

 

 

 

 

 

 

 

I thought I could shed some light on these awesome new additions to the Starcraft 2 Universe, enjoy.

An Event Apart Seattle

Awesomness!  So I am sitting in a huge conference room just off of the shoreline in downtown Seattle with a bunch of fellow geeks.  I feel at home with my star wars shirt and get pumped for the day of lectures.  I thought I would give a brief overview of what I hear as the people speaking here are industry leaders in their respective fields.

Jefferey Zeldman – Founder of Happy Cog

He talked about the mistakes he made and how he learned from them.   He gave a list of ten things he learned, they are as follows:

  1. Know Before You Go.
    Don’t get into a situation where the scope is not defined, or the client is not aware of real time constraints.  This is one of the most common problems in the web industry.
  2. Keep expectations on track and in sync.
    Maintain contact with your client or boss so that there aren’t any “surprises.”  Keep them up to date to protect yourself and the client.
  3. Constantly course correct.
    Don’t get stuck in your own rut.  This is in reference to internal workings, don’t be afraid to try new things on a project, but be ready if things don’t go as planned.
  4. Tell the TRUTH.
    This seems obvious, but it can be a problem when something goes wrong.  It’s human nature to avoid conflict, but lying and deception will never cut it in the long run.
  5. Phrase it from the client’s / boss’s Point of View.
    There are many ways to say “no” without saying it.  Boss’s and Client’s never want to hear “Nope, can’t do it.”  If you aren’t going to make a deadline then be honest about it and have a plan that you have already developed.
  6. Report bad news before the client/boss notices it.
    This can go along with telling the truth as it is never pleasant to tell your boss/client bad news.  Step up with a plan and be early.  The faster the better with bad news.  The boss/client might have a solution you didn’t think of if you come early.
  7. Have a recovery plan.
    Bad things happen no matter how many protections you have in place.  If you plan for emergencies you will always be ready to take anything on.  This seems like common sense, because it is!  Back up all your work and save often.
  8. Apologize – but never denigrate yourself or your team.
    Don’t throw yourself or team members under the bus.  If you made a mistake admit it, fix it and move on.  Imagine if someone threw you under the bus and then having to work with them in the same office for several months or years.  Just don’t do it.
  9. Have an exit strategy.
    Have legal clauses that allow you to “fire your client.”  This means that if things aren’t going well on either side you have a way to leave gracefully with a”it’s not you, it’s me” philosophy.  This is not giving up, this is if disputes can’t be settled.  Avoid court as much as possible.  It’s ugly and costly.
  10. Know when to quit.
    If it looks like you are walking into a trap, don’t do it!  This isn’t talking about leaving a job early or leaving work unfinished.  This is in reference to knowing when something is going to be detrimental to your success.

Augmented Reality

Lately I have been working with Augmented Reality and understanding how flash works with mediums outside of the computer screen.  Basically you use a web cam to capture data from a “glyph” or design pattern and then you can see different information displayed on top of the pattern.  Sounds confusing?  Seeing is believing, here is a sample of something I worked on:

Augmented reality

The uses for this kind of technology are wide open and who knows if this kind of “hologram” technology could be seen as common and accepted throughout our communities.  Right now we are using this technology to prototype an up and coming product that would utilize kiosks as the medium for delivery.  The user would choose the object to view by “showing” the web cam a design pattern resulting in a 3D object in someone’s hands.  Much like the cube in the image above, but you can literally put anything on that pattern with the right tools.