Loading ...
Sorry, an error occurred while loading the content.

8210fscommand2("GetPlatform")

Expand Messages
  • Dale Rankine
    Mar 3, 2009
    • 0 Attachment

      Hey everyone, just found a little gotcha when using Device Central CS4 (don’t know if this exists in CS3 as well).

       

      When you are getting the return value of status = fscommand2(“GetPlatform”, “platform”); for Nokia S40 devices, the string that comes back looks like “Nokia OS”. You might then be checking that value in order to change some conditions in your application, so you might do something like if(platform == “Nokia OS”) ...

       

      What isn’t obvious from tracing the variable is that there’s a whitespace at the end of this string (as in “Nokia OS “) and so that test on the absolute value needs to also include the whitespace, otherwise it fails.

       

      Returns the same too (with the whitespace) for FL2 and FL3

       

      Just came across this doing some development today and just thought I’d share that one with y’all ...

       

      Dale.

       

       

      ------------------------------------------------------

      dale@...

      www.dalerankine.com

      Adobe Certified Instructor (Mobile)

      Certified Flash Lite Developer
      Adobe Community Expert (Mobile)

      Adobe Ambassador (Pacific)

      Forum Nokia Champion

      Mobile Monday Brisbane Co-Manager

       

       

       

    • Show all 13 messages in this topic