DreamingWell Logo

Flex Mobile Custom URL Schemes

Posted by Travis Collins on June 27, 2011

Android and iOS support launching applications via custom URL schemes, or in other words, apps can be launched by the user clicking a link or button other than the icon on the start screen. This feature allows developers to add links on public websites, or use "launch URL" commands in applications, that will cause the mobile OS to open a specific application.

Flex Mobile, using Adobe Air's android and iOS packager, supports these custom url schemes. The configuration for this custom scheme is done in the AIR application description XML file. The following shows an example custom url, use of that URL in regular HTML that would be placed on a website, and the configuration

Example Custom URL Scheme

Example HTML Link

<a href="myapp://">Open MyApp</a>

Example XML for Android

<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="myapp"/>

Example XML for iOS




But this way not always works on android, example on HTC sensation z710e, the webkit engine will format your custom url become http scheme before launching, in this case myapp:// will become http://www.myapp.com//, that mean you won't be able to capture custom url myapp:// clicking event.

Comment by Kairen at May 3, 2012 5:41 AM

Post a comment

Remember Me?

(you may use HTML tags for style)

Twitter Status


Last Seen in

Privacy Policy

Copyright DreamingWell.com 1998 - 2011