International Domain Names | Register Domains | Used Cars, New Cars and Contract Hire | Tool Sensor | .COM.SG Domain Registration | Office Computer Supplies | Tractor Parts | Personal Hosting |

Calendar

September 2010
S M T W T F S
« Jul    
 1234
567891011
12131415161718
19202122232425
2627282930  

Tag Cloud

Categories

Archives

Recent Posts

Recent Comments

Are you building AIR on Android yet?

By Rich Tretola | July 23, 20102,340 views

Yesterday I wrote my first post on AIR on Android and I then wondered how many of you are actually involved in this public pre-release?

Since there is no support yet for the Flex framework, I would suspect many of you are waiting in the wings but eager to jump in. So I can, please let me know by answering this poll.

Topics: Adobe AIR, android | 22 Comments »

AIR On Android – Geolocation

By Rich Tretola | July 22, 20101,967 views

So July has been a quiet month for this blog, my apologies. I have been spending some time digging into the AIR on Android documentation. Working with the Flash CS5 IDE has been like going in a time machine. It has been quite a while since I have build any Flash Player based application with anything other than the Flex Framework. I would assume that as soon as this becomes a viable option, I will again return to relying on the framework.

My time has been spent working up some proof of concept stuff for an upcoming project. I have been exploring the flash.sensors.Geolocation class for interacting with the devise’s GPS and the flash.media.CameraRoll class for browsing the image library.

First the Geolocation class, I’ll discuss the CameraRoll in a future post. It is very simple to use. In the example below, I have two text fields on my Flash CS5 stage called geoStatus and geoResponse.

Let’s discuss the code below. The constructor makes a call to super() and locate(). The locate() method creates a new instance of the Geolocation class, sets the interval to 100 milliseconds, and adds an event listener to handle the updates that are generated every 100 milliseconds. Since the speed is returned in meters per second, the handleLocationRequest() method creates two variables for miles per hour and kilometers per hour and does the math. Next the text fields are updated to show the last update time and the data returned.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package
{
    import flash.display.Sprite;
    import flash.sensors.Geolocation;
    import flash.events.GeolocationEvent;
   
    public class geo extends Sprite {
        private var geoLocation:Geolocation;    
        public function geo() {
            super();   
            locate();
        }

        private function locate():void  {
            if(Geolocation.isSupported==true){
                geoLocation = new Geolocation();
                geoLocation.setRequestedUpdateInterval(100);
                geoLocation.addEventListener(GeolocationEvent.UPDATE, handleLocationRequest);
            } else {
                geoStatus.text = "Geolocation feature not supported";
            }
        }
       
        private function handleLocationRequest(event:GeolocationEvent):void {
            var mph:Number = event.speed*2.23693629;
            var kph:Number = event.speed*3.6;
            geoStatus.text = "Updated: " + new Date().toTimeString();
            geoResponse.text = "latitude: " + event.latitude.toString() + "\n"
                + "longitude: " + event.longitude.toString() + "\n"
                + "altitude: " + event.altitude.toString()  + "\n"
                + "speed: " + event.speed.toString()  + "\n"
                + "speed: " + mph.toString()  + " MPH \n"
                + "speed: " + kph.toString()  + " KPH \n"
                + "heading: " + event.heading.toString()  + "\n"
                + "horizontal accuracy: " + event.horizontalAccuracy.toString()  + "\n"
                + "vertical accuracy: " + event.verticalAccuracy.toString()
        }
    }
}

One more thing that is required is the addition of the android permission to allow access to GPS within the application config file.

1
2
3
4
5
6
7
8
9
<android>
        <manifestAdditions>
            <manifest>
                <data><![CDATA[
                <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
                ]]></data>
            </manifest>
        </manifestAdditions>
    </android>

The results can be see in the screen shot below:

geolocation

Topics: Adobe AIR, android | 18 Comments »

Flash Player Mobile 10.1 partners announced, Apples missing the party!

By Rich Tretola | June 22, 20102,838 views

Adobe has announced the release of Adobe® Flash® Player 10.1 to mobile platform partners.

“Already one of the top free apps on Android™ Market today, Flash Player 10.1 will be available as a final production release for smart phones and tablets once users are able to upgrade to Android 2.2 “Froyo.” Devices supporting “Froyo” and Flash Player 10.1 are expected to include the Dell Streak, Google Nexus One, HTC Evo, HTC Desire, HTC Incredible, DROID by Motorola, Motorola Milestone, Samsung Galaxy S and others. Flash Player 10.1 was also released to mobile platform partners to be supported on devices based on Android, BlackBerry, webOS, future versions of Windows® Phone, LiMo, MeeGo and Symbian OS, and is expected to be made available via over-the-air downloads and to be pre-installed on smart phones, tablets and other devices in the coming months.”

http://www.adobe.com/aboutadobe/pressroom/pressreleases/201006/06222010FlashPlayerAvailability.html

Topics: Announcements, Flash Player, android | 31 Comments »

Flash Player 10.1 Android Update

By Rich Tretola | June 10, 20102,488 views

Looks like Adobe is rolling out a new version of Flash Player 10.1 for Android. Here are some screen shots of my experience this morning. The download was 3.75 mb.

fpupdate fpversion

Topics: Flash Player, android | 20 Comments »

AIR for Android Public Beta Now Open

By Rich Tretola | May 20, 20102,506 views
AIR on AndroidBig news from Google I/O this morning. The AIR for Android beta program is now publicly available!

To sign up just visit:
http://labs.adobe.com/technologies/air2/android/

Screen Cap:

aironandroid

Topics: Adobe AIR, Announcements, android | 27 Comments »


« Previous Entries