Showing posts with label Adobe Flash Builder (code named Burrito). Show all posts
Showing posts with label Adobe Flash Builder (code named Burrito). Show all posts

Sunday, December 5, 2010

Calling and SMS through AIR application on Android Device

Adobe AIR 2.5 has support for two additional URI. Earlier we had mailto URI to navigate to system default email client. Similarly if you want to use system (Mobile) calling client you can do that using tel: URI or if you want to use system(Mobile) SMS client you can do that using sms: URI.

In this article, I will walk you through how we can access the mobile default calling / SMS client. To understand this article one should have knowledge of AS3 and deploying AIR application on mobile. If you are new to this technology (Air on Android). You can refer to my previous post to understand the deployment procedures.

Adobe has launched preview released of Flash Builder Burrito with Hero Flex SDK. We will use Hero Flex SDK to create this simple application.



See code snipped for the application below.



xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="Dial or SMS">

horizontalAlign="center"
paddingTop="10" paddingLeft="10" paddingBottom="10" paddingRight="10"/>




protected function callBtn_clickHandler(event:MouseEvent):void
{
navigateToURL(new URLRequest("tel:"+telNumber.text));
}

protected function smsBtn_clickHandler(event:MouseEvent):void
{
navigateToURL(new URLRequest("sms:"+telNumber.text));

}

]]>






width="100%"
restrict="0-9"/>
width="100%"
gap="5"
paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"
verticalAlign="middle" horizontalAlign="right">
label="Call"
click="callBtn_clickHandler(event)"/>
label="SMS"
click="smsBtn_clickHandler(event)"/>




If you notice in the script tag, There is a navigateToURL method executed on Clicking of Call / SMS button.

Following code will trigger the default system calling client.

navigateToURL(new URLRequest("tel:"+telNumber.text));
This method will open up the dial panel of the mobile phone. See below image.

Following code will trigger the default system calling client.

navigateToURL(new URLRequest("sms:"+telNumber.text));
This method will open up the SMS panel of the mobile phone. See below image.


Note: Body and subject attributes is not supported in sms: URI like we do for the mailto: URI due to the limited support from the android API.

I hope this will help you.


Read more...

Thursday, November 25, 2010

Meter Down Application for Android: Developed using Flex Hero

Finally I got a chance to explore Adobe Flash Builder Burrito (Flex Hero SDK). It has support for developing Cross-platform Air application. Currently it is supporting Android only. Hope we will see all other Mobile, Tablets also covered in final version of Hero SDK.

To do experiment, I had decided to develop an application. I want to develop an application which can be useful to the user. After thinking for enough hours, I have decided to develop an application which will help user to get the Mumbai Auto and Taxi Fare for the meter reading. I heard from my relatives, freinds that they had been cheated by Auto and Taxi driver for fares.

Here it is Meter Down application for Android Mobile OS. In this current version, I have covered only Mumbai city. May be I will add more cities in future. I will really appreciate if you can share the meter card for Auto or Taxi from your city.

The current application is having feature of getting Regular as well as Night Fare for Auto and Taxi. The night fare will be calculated based on the mobile time. If it is between 12.00 AM to 5.00 AM, it will show night fare.

You can download APK of this application from here.

You can download Air Runtime APK (Runtime_Device_Froyo_20100826.apk) from here.


Note: Change the file extention of downloaded file to .apk before installing on your device.

I hope this will help you while you travel in MUMBAI by Auto / Taxi.






Read more...