在Android里,很简单
在iOS里需要做如下设置。
<iPhone>
<InfoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>2</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>example</string>
</array>
<key>CFBundleURLName</key>
<string>com.example</string>
</dict>
</array>
]]>
</InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
在你的AIR程序里,接收调用程序传递的参数。应该加上
NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
private function onInvoke(e:InvokeEvent):void
{
var arg:Array = e.arguments;
}