Friday, September 14, 2012

Adobe Flex 4.6 : Mobile Application From Tip To Toe



                                      System requirements

Adobe Flex builder 4.6 (trail available on internet for download) download here.
Adobe Flex4.5 also supports mobile application development but the new Adobe flex 4.6 has more components and updates. The new features of Flex 4.6 will help you to achieve great performance and experience, especially with scrolling lists and transitions between views.

                      Supported operating systems

·         Microsoft® Windows® 7 (32 bit), Windows Vista® (32 bit), or Windows XP Professional with Service Pack 2 or 3
·         Mac OS X v10.5.6–10.6 (Intel® only)
·         Ubuntu 9.10
·         Fedora Core 12

                                            Java virtual machine

Java™ Virtual Machine (32 bit), IBM® JRE 1.5, IBM JRE 1.6, Sun™ JRE 1.5, Sun JRE 1.6

                      Supported runtimes

·         Adobe® Flash® Player 11
·         Adobe AIR® 3


                                      Sample Flex Mobile Application

Let’s start building a simple flex mobile application for android. Flex 4.6 lets you develop native applications for Android devices, BlackBerry and IOS. We are taking example of android since it’s widely used among Indian masses.
I’ll cover a simple hello word mobile application development here and will show you how to deploy it on your android device.

Step : 1 Open New Mobile Project

Open a new Flex Mobile Project




Give your project a name, say “HelloWorld” and click on Next





Choose a template , here we are using a blank “View Based Application  for Google Android. Now click on Finish.






Step : 2  Default Project Structure

In the Package Explorer you will see your project created with some default structure like this



Under default package resides default main application file.
HelloWorld.mxml

xmlns:fx="http://ns.adobe.com/mxml/2009"
                                   xmlns:s="library://ns.adobe.com/flex/spark" firstView="views.HelloWorldHomeView" applicationDPI="160">
      
The  firstView contains the name of the file to be shown first when application is executed.

Step : 3  HelloWorld Example Code

In HelloWorldHomeView.mxml we will simply create a Label and two buttons to hide and show the Label.
HelloWorldHomeView.mxml
xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView">
       <![CDATA[
protected function btnClick_clickHandler(event:MouseEvent):void
              {
                     lblHello.text="Hello World";                                  }
             
protected function btnClear_clickHandler(event:MouseEvent):void
              {
                     lblHello.text="";
              }
             
       ]]>
  width="50%" height="162" >
      
horizontalAlign="right"
verticalAlign="top"/>
       id="lblHello"/>
       id="btnClick" label="Click Me"
              click="btnClick_clickHandler(event)"/>
       id="btnClear" label="Clear"
click="btnClear_clickHandler(event)"/>  

Step : 4 Run on Desktop

To Run the application click Run button or press Ctrl+F11. On first time execution the run configuration appears.



Choose the option On Desktop and then device name (like Samsung Galaxy Ace) and then click on Run.


 

OutPut :


Step : 5  Installing .apk on device

In order to create the .apk file which will be deployed on your device we need to Export Release build

Click Next and go to Digital Signature tab . Create your Certificate and Password by clicking on create button. And then click on Finish.




You can now see your .apk (HelloWorld.apk) file in Package Explorer

Now send this .apk to you device via Data Cable or Bluetooth and install the application and Enjoy!!!
 If you face any issues in Exporting Release Built kindly refer following link : Installing an application on a Google Android Device

Wednesday, February 22, 2012

Moments To Remember With The Movies I Saw


I have many memories with the movies that I have seen in my life and I m sure you guys too have many. From childhood till now I quickly connect a movie with the moments connected with it.

            I can’t even remember some of my childhood movie’s names but I remember my brother use to show us every Arnold Schwarzenegger movies and all Chinese action movies no matter how boring they are for us. He even forced us to see those silent movies which were way ahead of our understanding. He used to explain us the story but we use to laugh and have fun seeing his dedication to convince us for those bore slow movies.

The first movie in a hall is always a moment to remember for everyone. I’m sure it’s not only me whose first movie in a theater was "Hum Aapke Hai Kaun". Had a great experience to watch flops with school buddies, first movie with buddies "Chor Machaye Shor" it was fun to watch flops when u have good company. Reasons to watch movies were many, fight with best friend n stress reliever was nearest PVR theater. 

Get together with childhood friends, friend got first job, exams are over, wanna eat pop corns, birthday, break ups, patch ups, farewell, getting bore. What to do after bunk, watch a movie. Friend is on date, inside the hall and we are waiting for her for 3 hrs outside and then return home pretending we had fun watching movie together. The craze of watching DVDs, spending hours and hours in the room watching movie all alone just coz had craze for horror movies and Action movies.  First Late night show that too of a movie like "Mangal Pandey". The hilarious comments that bunch of guys at back seat passed while watching those serious dramas. Cozy scene on screen and friend sitting next to you has wide eyes open with the straw in mouth. Sitting on 3rd seat from corner and the corner seat couple is busy in creating their own moments, who enjoys the movie in that case. Bunk from office and fight with the PVR manager to take care of our laptops. Forgetting keys, cell phones and wallets inside hall. Hiding yourself from neighbors sitting in next row. Hooting in hall n irritating everyone around.

Well I think I should stop here now. Hope you too got few memories back after reading it. If u did then feel free to share your comments.

Please Vote here