Search

 

October 2010
S M T W T F S
« Sep   Nov »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Tags

Archives


« | Main | »

AIRonAndroid Browser Application

By Rich Tretola | October 8, 2010
26,322 views

Got an Android devise? Go get the AIR runtime and then install my AIRonAndroid Browser demo application to see Adobe AIR in action and play with things like Geolocation, Multitouch, etc…
Link to AIRonAndroid Browser
or point your camera at:

AIRonAndroid Browser

AIRonAndroid Browser

IF THE LINK ABOVE DOESN’T WORK, YOU CAN DOWNLOAD THE APP HERE
or do a DIRECT INSTALL HERE PLEASE LET ME KNOW IN COMMENTS IF YOU CAN NOT USE THE MARKETPLACE TO GET THE APP.

This application demonstrates the API’s that are available to Adobe AIR on Android developers. Demonstrations include Accelerometer, Camera, Geolocation, Multitouch, StageOrientation, and KeyboardEvents.

aironandroidbrowser2

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

33 Responses to “AIRonAndroid Browser Application”

  1. Rob Says:
    October 8th, 2010 at 9:44 am

    It appears that this app can’t be found on the market. Bummer… I really wanted to give it a try.

    Reply to this comment

    Rich Tretola Reply:

    Not sure why, when I search I find it.

    Reply to this comment

    Rich Tretola Reply:

    You can now download directly from here:
    http://www.everythingflex.com/AIR/ANDROID/AIRonAndroidBrowser.apk

    Reply to this comment

  2. Nick Kwiatkowski Says:
    October 8th, 2010 at 11:27 am

    Works great on the Droid2 !

    Reply to this comment

  3. AIRonAndroid Browser Application | Android Air Apps Says:
    October 10th, 2010 at 4:02 am

    [...] the app here This entry was posted in Uncategorized. Bookmark the permalink. ← Publishing AIR for [...]

  4. soimon Says:
    October 10th, 2010 at 5:55 am

    Made in Flex?

    Reply to this comment

    Rich Tretola Reply:

    I will not confirm or deny. :-)

    Reply to this comment

  5. Adobe AIR News Roundup: 10/12/2010 – Adobe AIR Team Blog Says:
    October 12th, 2010 at 3:40 am

    [...] Tretola built an application that demonstrates "accelerometer, camera, geolocation, multitouch, stage orientation, and [...]

  6. Roman Says:
    October 12th, 2010 at 6:44 am

    Thanks! Very useful app!
    Just installed and played with it.

    Btw is there any tests comparing the perforance of AIR-apps and NAtive apps running on Android out there?
    I’d like to see how they consume cpu and battery.
    Don’t think AIt could be possibly better, I just want to know how much worse it is :)

    Reply to this comment

  7. Adobe AIR News Roundup: 10/12/2010 (Adobe Flash Platform Blog) Says:
    October 13th, 2010 at 12:23 pm

    [...] Tretola built an application that demonstrates "accelerometer, camera, geolocation, multitouch, stage orientation, and [...]

  8. Is that HTML in your AIR on Android App? Yes it is! | EverythingFlex: Flex & AIR Says:
    October 13th, 2010 at 4:11 pm

    [...] Recent CommentsRich Tretola on And we’re back. Adobe AIR on iPhone!Tomas Sancio on And we’re back. Adobe AIR on iPhone!Adobe AIR News Roundup: 10/12/2010 (Adobe Flash Platform Blog) on AIRonAndroid Browser Application [...]

  9. Jan Says:
    October 16th, 2010 at 12:39 pm

    Just tried it on my new Samsung Galaxy Tab. Works like a charm. :-)

    Any chance that we can see the source code for the app? I would love to see how you´ve done it.

    Reply to this comment

    Rich Tretola Reply:

    Yes, after Adobe MAX.

    Can you send me a screen shot of the app running on a galaxy?

    Reply to this comment

    Jan Reply:

    Awesome, looking forward to that.

    Sure, after work i take a couple of screens and send them to you.

    Reply to this comment

    john Reply:

    Is the source available yet?

    if so, where would I find that? thanks!

    Reply to this comment

    Rich Tretola Reply:

    Hi John,

    I didn’t bother releasing the source as the Tour de Flex Mobile is a more complete example of the api functionality.

  10. Flex Based AIR on PlayBook – tutorial | EverythingFlex: Flex & AIR Says:
    November 18th, 2010 at 1:21 pm

    [...] is a screen shot of my AIRonAndroidBrowser app running on the PlayBook [...]

  11. John Says:
    December 17th, 2010 at 12:26 pm

    If you change your mind I’d love to get the source. I’ve been trying to get the simplest stagewebview working and had no luck. I grabbed tour de flex examples but I’m still stuck!

    Reply to this comment

    Rich Tretola Reply:

    Here is an example of a View with a StageWebView included:

    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
    40
    41
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" creationComplete="init()"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Home">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
       
        <fx:Script>
            <![CDATA[
                [Bindable]
                private var _stageWebView:StageWebView;
                private var rect:Rectangle;
                private function init():void{
                    rect = new Rectangle(20,100,300,400);
                }
                                       
                private function _onLocationChange(event:LocationChangeEvent):void {
                    loc.text = event.location;
                }
               
                private function createSWV():void{
                    _stageWebView = new StageWebView();
                    _stageWebView.viewPort = rect;
                    _stageWebView.stage = stage;   
                    _stageWebView.addEventListener(LocationChangeEvent.LOCATION_CHANGE, _onLocationChange);            
                }
               
                private function setLoc():void{
                    _stageWebView.loadURL("http://blog.everythingflex.com");
                }
               

            ]]>
        </fx:Script>
        <s:VGroup>
        <s:Label id="loc" text="{StageWebView.isSupported}"/>
        <s:Label text="{_stageWebView.location}"/>
            <s:Button click="createSWV()" label="createSWV"/>
            <s:Button click="setLoc()" label="setLoc"/>
        </s:VGroup>
    </s:View>

    Reply to this comment

  12. John Says:
    December 18th, 2010 at 6:17 am

    Rich, thanks so much for the code! I’m getting an error when I click setLoc,

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at views::StageWebViewExampleHome/setLoc()[C:\Users\VisWebLaptop\Adobe Flash Builder Burrito Preview\StageWebViewExample\src\views\StageWebViewExampleHome.mxml:29]
    at views::StageWebViewExampleHome/___StageWebViewExampleHome_Button2_click()[C:\Users\VisWebLaptop\Adobe Flash Builder Burrito Preview\StageWebViewExample\src\views\StageWebViewExampleHome.mxml:38]

    any idea what I’m doing wrong?

    Reply to this comment

    Rich Tretola Reply:

    Make sure you click the createSWV button first before clicking the setLoc button. Or add a call to createSWV() within the init() function.

    Reply to this comment

  13. AIRonAndroid Browser now runs on iPod/iPad/iPhone! | EverythingFlex: Flex & AIR Says:
    December 27th, 2010 at 11:26 am

    [...] Recent CommentsSharron Clemons on Build a MultiScreen (Android,Blackberry) Application in 10 Minutes!ThaStyle on Build a MultiScreen (Android,Blackberry) Application in 10 Minutes!Rich Tretola on AIRonAndroid Browser Application [...]

  14. DoodyMan Says:
    December 28th, 2010 at 10:34 pm

    Won’t install on the HTC EVO?

    Reply to this comment

    Rich Tretola Reply:

    Yes, I am aware. There are some manifest settings that need to be adjusted. I’ll update it soon.

    Reply to this comment

  15. John Says:
    December 29th, 2010 at 11:53 am

    it installs on my HTC EVO just fine! I bought my phone around the 1st of December.

    Reply to this comment

  16. Vishal Says:
    January 12th, 2011 at 5:17 am

    Can u tell me how to load a local html file using StageWebView on an android device.

    Reply to this comment

  17. Jabari Says:
    January 12th, 2011 at 12:00 pm

    Can you please post the code from the StageOrientation View??? This would help me tremendously with a problem I’ve had for 2 days! The Tour de Flex app helped, but I think this will give me exactly what I need…

    Thanks in advance!

    Reply to this comment

    Rich Tretola Reply:

    Here is a simple example:

    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
    40
    41
    42
    43
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" creationComplete="init()"
            xmlns:s="library://ns.adobe.com/flex/spark" title="Home">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
       
        <fx:Script>
            <![CDATA[
                [Bindable]
                private var _stageWebView:StageWebView;
                private var rect:Rectangle;
                private function init():void{
                    rect = new Rectangle(10,200,300,400);
                }
               
                private function _onLocationChange(event:LocationChangeEvent):void {
                    loc.text = event.location;
                }
               
                private function createSWV():void{
                    _stageWebView = new StageWebView();
                    _stageWebView.viewPort = rect;
                    _stageWebView.stage = stage;   
                    _stageWebView.addEventListener(LocationChangeEvent.LOCATION_CHANGE, _onLocationChange);            
                }
               
                private function setLoc():void{
                    _stageWebView.loadURL("http://blog.everythingflex.com");
                }
               
               
            ]]>
        </fx:Script>
        <s:VGroup>
            <s:Label id="loc" text="{StageWebView.isSupported} click createSWV first"/>
            <s:Label text="{_stageWebView.location}"/>
            <s:HGroup>
                <s:Button click="createSWV()" label="createSWV"/>
                <s:Button click="setLoc()" label="setLoc"/>
            </s:HGroup>
        </s:VGroup>
    </s:View>

    Reply to this comment

  18. Jabari Says:
    January 12th, 2011 at 3:17 pm

    Hey Rich,

    Thanks for the speedy reply! I’d actually asked about the StageOrientation View though, not the StageWebview. I think you posted that already.

    My issue is not being about to get the screen dimensions of the device right away. I tried Capabilities.screenResolutionX / Capabilities.screenResolutionY. That simple returned the dimensions of the screen in general, not the demensions at that point in time.

    Thanks again!

    Reply to this comment

    Rich Tretola Reply:

    Sorry, replied to the wrong comment.

    You can use the following:

    stage.setAspectRatio(StageAspectRatio.LANDSCAPE)

    or

    stage.setAspectRatio(StageAspectRatio.PORTRAIT);

    Reply to this comment

  19. Vishal Says:
    January 14th, 2011 at 1:06 am

    @Rich

    Can you please let me know if i can actually load a local html file(residing in application folder) using StageWebView on an Android Device.

    This will help me a lot.

    Reply to this comment

    Rich Tretola Reply:

    I haven’t tried this but I can’t see why it woud be a problem. Just set the loadURL with a local path or parse and pass the actual html into the stagewebview.

    Reply to this comment

    Vishal Reply:

    Rich,

    I am developing an android application where I need to load a html file locally from the application folder.

    This html file have swf components which are also stored in the same folder. the embedded swf also loads a file stored in the same folder suppose an xml.

    Please let me know if i can actually load local html files on the StageWebView and access local files from the html loaded in StageWebView.

    Thanks in advance.

    Vishal

    Reply to this comment

Comments