Home » AIR, AIR for Android, Adobe, Flash AS 3

Air for Android and Flash CS5: remote xml requests and the uses-permission tag

27 August 2010 2 Comments

In my last Air for Android article I have explained how to load a local XML file in a Flash CS5 Android application.

Anyway, if you need to load a REMOTE xml file, you can use the same AS3 code, making a little change to your xml-descriptor file, otherwise you won’t be able to load a remote file.

So, compile your .fla in Flash CS5, open the generated xml descriptor file and add the following node just after the root node (< application xmlns="...." >).
Upload your app on your phone and your remote request magically works !!

   <android>
    <manifestAdditions>
      <manifest>
        <data>
	<![CDATA[
		<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
		<uses-permission android:name="android.permission.INTERNET" />
	]]>
        </data>
      </manifest>
    </manifestAdditions>
  </android>

You can avoid to add the WRITE_EXTERNAL_STORAGE permission, but I wrote it because it could be an useful info.

You could also find interesting following uses-permission tag, useful when working with the GeoLocation class:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

2 Comments »

  • james said:

    The latest version Flash cs5.5 is released. It integrates the AIR 2.6, and android target project. Flash CS5.5 Android Development

  • Fabio Biondi (author) said:

    yes, there are a lot of news…
    this article is very old : )

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.