Jan11

Recently Adobe has released beta version of the Flex SDK named "HERO" and Flash Builder "Burrito". Using this we can able to create mobile applications which you can run in Android OS based mobile phones.  Currently Adobe Flash Builder supports below devices to test and debug applications. But still we have the option to other mobile devices to configure in the "Preferences" section –> Flash Builder —> Device Configurations as shown below.  In that i added new device named "Samsung Galaxy" with Resolution details.

I spent some time to understand the flex mobile architecture (Spark Component). Adobe has created many demo application to make developer to understand the basic information to build mobile applications. Click here to know more about the resources and tutorials "http://labs.adobe.com/technologies/flex/mobile/"

After referring the above materials, am able to create one sample contact information application, which basically does add, delete, update and view the contact information. In this application wanted to try "SQLite" database to store this information and "Alive PDF" to write the contact information to PDF file and able to store the information locally inside the mobile device.

I have taken couple of screenshots of the application, available below. Also attached the source code and generated APK below

Download Source Code – Adobe Flex SDK 4.5 Beta

Download Installation File (APK)

Download updated APK

Download Updated Source Code – Adobe Flex SDK 4.5.1

Download updated APK (Flex SDK 4.5.1) – For Android Deployment

This is the sample application developed to understand the Flex mobile architecture and the API to play around with the Flex framework. If you find any issues or problems with the implementing the project, let me know.

Finally i want to thank "Adobe" for this beta release. when i started my career in "Adobe Flex" which was in early stage and released for only web application. Now i am proud to say that using "Adobe Flex" we can become Web/Desktop/Mobile application developer.  Using one language we can develop multi screen applications. A big thanks to Adobe for this great achievement.

32 Responses to “My First Flex Mobile Application – Contact Mobile App”

  1. Tweets that mention My First Mobile Application – Contact Mobile App | Megharaj SH -- Topsy.com Says:

    [...] This post was mentioned on Twitter by Eric Snowden, Renato Gomes. Renato Gomes said: My First Mobile Application – Contact Mobile App: Recently Adobe has released beta version of the Flex SDK named… http://bit.ly/eHRNqi [...]

  2. wasim kazi Says:

    I found this type of error when I install this apk Failure [INSTALL_FAILED_INVALID_APK].
    I Don't know where is the problem if any one have any idea regarding this error so please let me know.
    Thanks

  3. Megharaj SH Says:

    In which device you tried to install? Not all android phones having the Adobe AIR by default. Please check whether it is available or not. If not, then download and install the “Adobe AIR” from “Android Market Place”. Let me know the result

  4. Kalpesh Says:

    Hi Megharaj SH
     
    can you please tel me how can i get IMEI Number of device through flex program

  5. Cory Parrish Says:

    Does anybody know a way to get access to a users contact list from flex?

  6. Jean-Dominic Laroche Says:

    There is no API at the moment on Flex to access the contact list. It is possible to bypass this problem cause the contact list (at least on iOS) is stored in a SQL database that you are able to access from your application. (you can search about this on google to find how to do it but on iOS, the file to load is /private/var/mobile/Library/AddressBook/AddressBook.sqlitedb).

    but I am not sure that Apple will approve an application that access the contact list this way on the App store…

  7. Jean-Dominic Laroche Says:

    You must note that the API you are looking for is in development right now and some people who tried it said it was working perfectly but they cannot give any other details cause they accepted a  Non Disclose Agreement  clause to test it…

  8. Mike Says:

    I compile a Flex 4.5 for android and get .apk file. I load apk file on SD Card(can never get USB debugging to work) and when attempting to install apk on Android device via sd card, I get "Application not Installed".
    That's it!
    Any help is appreciated.

  9. Garbacea Ioan Says:

    Has anyone install software on a emulator or an error occurs telefon.Mi I'm next "invalid APK install failed".
    This error occurs in any application I Air I want to install it on emulator / phone

  10. Arthlem Says:

    Hi,
    I recently update this application to AIR 2.6. It can resolve the installation problem. If you want to test, go here =>  http://www.arthlem.be/ContactDB.zip

  11. Megharaj SH Says:

    Awesome job. thank you

  12. ohokke Says:

    Awesome! Bu source code file is unable to open in Flash Catalyst CS5.5. Is there any other way to see the source code? Or maybe you have a reference link where you found the information on manipulating phone contacts?

  13. Megharaj SH Says:

    This is not a flash catalyst project. You can import this project in flash builder. Inacse if you want to see the source code, just change the extension from fxp to zip. Then use winzip or winrar to extract the files.

  14. ohokke Says:

    Ahhh ok. Awesome. Just to be sure, does this app view the contacts from the phone or some other database? If it is uses the phones contacts, does this also work on blackberry and iOS?

  15. Megharaj SH Says:

    When i developed this application, that time the Adobe Flash builder was in Beta release. It was not supported for Blackberry and iOS and there was no API to pull the phone contacts.
    Now in the latest release you can port the same code into Blackberry and iOS.

  16. ohokke Says:

    Yea but will the SQL queries also work on iphone and blackberry? :O

  17. Megharaj SH Says:

    Once your application package is installed in the device, this application going to use Adobe AIR to run. By default SQLite is available in the Adobe AIR runitme. So there is no dependency on the device OS whether it supports or not. Only thing is the device should support the Adobe AIR in that. Then you can use SQL queries with the Adobe AIR API. Hope its clear to you.

  18. ohokke Says:

    Well I'm just wondering if AIR knows what to do with the queries on those iOS/Blackberry devices. If it is ported correctly and so if it will actually use the devices contacts list or that it will just return empty resutls. Anyone who feels like testing this? (I can't atm)

  19. Vivek Says:

    Not working shows error  in this line "initialize="initApp(event)"

  20. Vivek Says:

    Normally import the source code but shows error is there any video tutorial or snapshot tutorial of this

  21. Megharaj SH Says:

    This project developed in Flash Builder 4.5 Beta version. So in the recent release Flash Builder 4.5 they have modified so many things. So i request you to take the logic and the implementation code then port into the Flash Builder 4.5 Project and use Flex SDK 4.5.

  22. Vivek Says:

    I have imported the source code in flash builder 4.5 but shows error can u upload updated code.

  23. Megharaj SH Says:

    Hi Vivek,

    Sorry for replying late. I was little busy with my other work. Today got some free time and i ported the existing Flex SDK 4.5 Beta application to Flex SDK 4.5.1, and Adobe made some of the changes which is not exist in this version
    1. MobileApplication (used ViewNavigatorApplication)
    2. There is no MobileIconItemRenderer
    2. decoratorClass is not available itemrenderer.

    So the behavior of the application is little different compared to old one. You can download the latest source code from here

  24. PG Says:

    How do i download fxp file. I cannot see the source code.

  25. Megharaj SH Says:

    You can download the fxp here : http://www.flextechie.com/downloads/Contact%20DB.fxp ( Import this FXP in Flash Builder)

  26. Jackson Tan Says:

    May I know how does it connect to the Database?

  27. Jackson Tan Says:

    Sorry, i've just started learning how to use flash builder. I manage to get your example working fine, it is great! However may I ask how did you store the data? &If it is database, may you let me know how did you do it? Thanks!

  28. Megharaj SH Says:

    @Jackson : This application requires “Adobe AIR” runtime to run in the device, Adobe AIR has light weight database “SQLite”. Using standard Adobe AIR api we can create, connect and modify the database. Check the following links, you may get more information about “Adobe AIR” and “SQLite”

    http://www.peterelst.com/blog/2008/04/07/introduction-to-sqlite-in-adobe-air/
    http://www.flex-blog.com/adobe-air-sqlite-example/

  29. Simadri Says:

    Hi,
    I got this error while clicking on your download link.
     
     
    An invalid character was found in text content. Error processing resource 'http://www.flextechie.com/downloads/Contact%20DB...
    Can u provide me ur sample application source anyway.
    Thanks ,
    Simadri :)

  30. Simadri Says:

    Hi,
    Actually I made one demo DB in flash builder 4.5 with SQLite.
    I packaged the application for iOS. On my desktop its working fine but on iPad its showing nothing, means when searched something it shows nothing.
    I guess the DB is not fetched. can u plz help me out.
    Thanks,
    Simadri

  31. Megharaj SH Says:

    Check app.xml for configuration. I think you should enable particular feature via your <appname>-app.xml. Let me know the result.

  32. MAK Says:

    When I import the fxp in my flash builder, it shown an error in the Main-app.xml file……..
    How can I remove that error?

Leave a Reply