O'Reilly logo

Flash Development for Android Cookbook by Joseph Labrecque

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing the StageWebView history

When developing applications for Android, AIR allows us to render complete websites through the use of theStageWebView class. We also can tap into the navigation history of our StageWebView instance and apply that in different ways within our application.

How to do it...

Once a user has loaded a number of pages within our StageWebView instance, we will be able to navigate back and forth through the navigation history:

  1. First, import the following classes into your project:
    import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.events.LocationChangeEvent; import flash.events.TouchEvent; import flash.geom.Rectangle; import flash.media.StageWebView; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required