2013-05-13 70 views

回答

0

您可以將所需的所有意圖添加到應用程序描述符的正確部分。查找與android相關的部分:

... 
<android> 
     <manifestAdditions> 
     <![CDATA[ 
      <manifest android:installLocation="auto"> 
       <uses-permission android:name="android.permission.INTERNET"/> 
       <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 
       <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 
       <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/> 
       <application android:enabled="true"> 
        <activity android:excludeFromRecents="false"> 
         <intent-filter> 
          <action android:name="android.intent.action.MAIN"/> 
          <category android:name="android.intent.category.LAUNCHER"/> 
         </intent-filter> 

            <!-- ADD INTENTS HERE --> 

        </activity> 
       </application> 
      </manifest> 
     ]]> 
     </manifestAdditions> 
     <!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after --> 
     <!-- <colorDepth></colorDepth> --> 
</android> 
... 

請注意,這只是故事的一半。爲了正確地消費那些你應該處理他們的意圖在你的代碼,這樣的事情:

NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE,onInvoke); 
... 
function onInvoke(event:InvokeEvent):void 
{ 
    /* handle your intent here */ 
} 

請參考官方文檔here

相關問題