如何从发送意图接收数据?

Uli*_*Uli 8 air android android-intent

如何从基于Adobe Air的Android应用程序中的发送意图接收数据?

我尝试了下面的方式,但传入的参数数组和事件是空的,共享内容丢失.

这是我的Air源文件和测试.apk文件,如果有人可以看看它会很棒.

空气:

import flash.desktop.NativeApplication;
import flash.events.InvokeEvent;

NativeApplication.nativeApplication.addEventListener(InvokeEvent.INVOKE, onInvoke);
NativeApplication.nativeApplication.addEventListener(BrowserInvokeEvent.BROWSER_INVOKE, onBrowserInvoke);

function onInvoke(event:InvokeEvent):void
{
trace("\n Invoke event: " + event)
}

function onBrowserInvoke(event:BrowserInvokeEvent):void
{
trace("\n Browser Invoke event: " + event)
}
Run Code Online (Sandbox Code Playgroud)

XML(app.xml清单):

<android> 
    <manifestAdditions> 
      <![CDATA[ 
               <manifest>
<uses-permission android:name="android.permission.INTERNET"/>
   <application>
     <activity>
<intent-filter>
                        <action android:name="android.intent.action.MAIN"/>
                        <category android:name="android.intent.category.LAUNCHER"/>
                    </intent-filter>
                    <intent-filter>
                        <action android:name="android.intent.action.VIEW"/>
                        <category android:name="android.intent.category.BROWSABLE"/>
                        <category android:name="android.intent.category.DEFAULT"/>
                        <data android:scheme="helloworld"/>
                    </intent-filter>
                <intent-filter> 
        <action android:name="android.intent.action.SEND"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:mimeType="text/plain"/>
    </intent-filter>
                        </activity>
            </application>   
        </manifest>
    ]]>
    </manifestAdditions> 
  </android>
Run Code Online (Sandbox Code Playgroud)

Ana*_*nas -1

我建议使用结构从本机扩展返回您想要的数据,有关详细信息,请参阅此答案。