A complete guideline on using Adobe AIR Pt.2 for building an amazing Android app
Mobile application development can turn to be a real nightmare if one isn’t well acquainted with the logic and language used for the same. One of the most brilliant means of developing an Android app for the next-generation of devices is embracing your current ActionScript/AIR skills.
Well, with a sequence of steps involved in drilling down and viewing details on a specific issue selected from a list, Adobe AIT Pt.2 will be coupled with more interaction between the remote ColdFusion server so as to request the desired information and fetch the expected data. In this blog, I’ll be looking at the ability available with Flash Builder ‘Burrito’ for running and debugging the Android application directly onto the Android device. I’ll be also covering the steps involved in transferring the dynamic content to a remote server.
Prerequisites for building Android apps using Adobe AIR Pt.2
- Adobe AIR
- Flash Builder Burrito
And now, the steps involved in building Android app using Adobe AIR Pt. 2:
Creating a view
Here, open up your MobileAIR project in Flash Builder ‘Burrito’. Here, within the Package Explorer window, right click on the Views folder and select New-> MXML Component for creating a new view component. Now, add a name ‘IssueDetail’ and accept all the remaining default values to generate a brand new file.
Passing information between views
On being selected from the main page list, the secondary view will display information for a certain issue. Here, add a ‘change’ attribute to the List control to ‘push’ the new view onto the view stack.
Configuring Input Type
For this, simply open the ‘Data/Services’ panel and right click the getIssueByID() method. Now, select ‘Configure Input Types’ from the context menu, followed by selecting the required input type for the IssueID parameter. For the getIssueByID() function, you need a numeric argument.
Fetch Specific Issue Data
For this, just right click the getIssueByID() method, followed by selecting Configure Return Type and choosing the Auto-detect option. To test the returned data, just enter an argument value of ‘1’ followed by proceeding to supply the name of ‘Issue’ for data type. Once you’re done with this, click ‘Finish’ to complete the wizard.
Add viewActivate Handler
Go to the ‘Design view’ and highlight the View item. For this, simply open the ‘Properties’ tab and within the Alphabetical View, scroll down to click on ‘viewActivate’ available within the list. Here, replace the dummy text comment with the method used for calling the specific issue.
Customizing the View Title
Here, in the Source View, choose to edit the title of the component that displays the issue number of the specific issue that’s been selected by the user.
Adding Back button
For this, go to IssueDetail.mxml and create an actionContent tag block. Within this block, create a button with the ID ‘backBtn’ and a lable of ‘Back’. Here, the backBTn_clickHandler() function will access the navigator instance and call the popToFIrstView() method for removing all views from the stack excluding the bottom one.
Converting the HTML
For displaying the content features in HTML format, just import a MobileTextField class to set the htmlText display property of the TextArea component. For this, simply add the following code to the view1_viewActivateHAndler function:
protected function view1_viewActivate Handler(event:FlexEvent):void
getIssueByID(data.ID as int); MobileText
Getting ColdFusion Hosting
For deploying and running the app on an Android device, simply transfer the code from the local ColdFusion server to a remote host. ColdFusion 9 hosting offered by Hostmediauk.com allows you to create your own remote ColdFusion 9 hosting account.
Moving the app to Live Server
You may use a remote server for testing the application. For this, just right click the project, select Properties and choose Flex Server. Here, change the Root URL to http://labs.mattgifford.co.uk and open MobileAIRHome.mxml for finding the function called getIssueCover, followed by changing the domain for images to http://labs.mattgifford.co.uk.
Changing the case
Since ActionSCript is case-sensitive and results obtained from local app testing environment are in uppercase as compared to lowercase data received from the live server, make it a point to change any references of the data variables to the appropriate case prior to testing against the LIVE server.
Running the app on your device
For this, all you need to do is simply enable USB debugging on your Android device, followed by connecting it to your machine. Here, select Run Configurations from the main menu and choose ‘On Device’. For this, you may need to turn on the Wi-Fi so as to ensure perfect connection speeds.
So with that last step, its a wrap on this guideline for using Adobe AIT Pt.2 for developing an out-of-the-box Android application. I’m sure you’d have enjoyed going through the steps and found them interesting and easy-to-follow. If you’re unable to understand a specific step or want to learn more, do share your views using the comments box below.
You may also like
Apps developers made a fortune from iPhone users during Black Friday
Samsung’s foldable display been stolen & sold to third party for $14m
The next Samsung Galaxy S10 could be designed exactly like this
Trump asks US allies to ban Huawei after blacklisting Chinese company from US government institutions
Panic at Apple after iPhone Xs didn’t sell quite as much as manufacturer wanted – Source
- A complete guideline on using Adobe AIR Pt.2 for building an amazing Android app
- Complete Google Pixel 2 XL specifications leak ahead of launch
- Availability information for the Motorola Moto G5 units promises the Russian market, complete with pricing information
- Blackberry officially announces the DTEK60, completes the spec sheet
- Xiaomi’s Mi 5 a Great Phone with Incomplete Feature