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

Invoking the Android Market using application URIs

The Android Market is unique to the Android platform and there is a dedicated application which allows users to easily search for, find, and install applications on their devices. Android allows a developer to tap into the Market application by passing in certain search terms.

How to do it...

We will build a small application to invoke navigateToURL and pass a predefined search term through a URLRequest object with the market: URI prefix. This will open the Android Market application and have it perform a search for us. In this example, we will open a new request once a TOUCH_TAP event is detected:

  1. First, import the following classes into your project:
    import flash.display.Sprite; import flash.display.StageAlign; ...

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