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

android – 如何从发送意图接收数据?,第1张

概述如何在基于Adobe Air的 Android应用程序中从 send intent接收数据? 我尝试了下面的方式,但传入的参数数组和事件是空的,共享内容丢失. 这是我的Air源文件和测试.apk文件,如果有人可以看看它会很棒. > https://www.dropbox.com/s/0evxp89y4w9h9i3/Share-Via_Air-Android.zip 空气: import flash 如何在基于Adobe Air的 Android应用程序中从 send intent接收数据?

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

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

> https://www.dropbox.com/s/0evxp89y4w9h9i3/Share-Via_Air-Android.zip

空气:

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)}

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>
解决方法 我建议使用结构从本机扩展返回您想要的数据,有关详细信息,请参阅 this answer. 总结

以上是内存溢出为你收集整理的android – 如何从发送意图接收数据?全部内容,希望文章能够帮你解决android – 如何从发送意图接收数据?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1138231.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-30
下一篇 2022-05-30

发表评论

登录后才能评论

评论列表(0条)

保存