通过Adobe Air Application启动Android应用程序 [英] Launching an Android App via Adobe Air Application

查看:205
本文介绍了通过Adobe Air Application启动Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以通过Intent调用与原生的android组件进行通信,但是我想知道如何通过Adobe Air应用程序启动应用程序(已安装)。



目前,感谢,我知道...

  var url:String =(intent:#Intent; + 
action = android.intent.action.MAIN;+
category = android.intent.category.LAUNCHER;+
component = com.android.settings /。设置;+
结束);
navigateToURL(new URLRequest(url));

...通过Air应用程序启动Android设置菜单,非常棒。但是我试图启动一个应用程序...我相信秘密在于component = com.android.settings / .Settings。片段。有谁知道我可以如何修改这个代码来启动一个设备上安装的应用程序?



我的王国有答案。我在互联网上搜索了几天。

Brad

解决方案

这取决于您的使用情况。 p>

如果您想要打开一个特定的应用程序,可以在< intent-filter> 元素,如从android浏览器启动自定义android应用程序中所述。然后制作适当的URL传递给 navigateToUrl()

另外一种可能性是获取包的名称应用程序要打开并设置为您的URL的组件= 部分。公平的警告,我真的不知道这是否会工作。



如果你不知道你想在编译时打开什么应用程序,它是困难的如果您有AIR应用程序可能需要调用的应用程序的服务器端列表)。 从Android上的其他应用程序启动应用程序显示如何启动一个应用程序,如果你只知道包的名称,但你需要一个本地扩展来启用该功能。

I know it's possible to communicate with native android components via the Intent call, but I'm trying to figure out how to launch an app (which is installed) through an Adobe Air application.

Currently, thanks to Ben, I know that...

var url:String = ("intent:#Intent;" +
                  "action=android.intent.action.MAIN;" +
                  "category=android.intent.category.LAUNCHER;" +
                  "component=com.android.settings/.Settings;" +
                  "end");
navigateToURL(new URLRequest(url));

...launches the Android Settings menu through an Air app, which is awesome.

But I'm trying to launch an app...and I believe the secret lies within the "component=com.android.settings/.Settings;" snippet. Does anybody know how I can modify this code to launch an installed app on a device?

My kingdom for an answer. I've scoured the internet for days searching on this.

Brad

解决方案

It depends on your use case.

If there's one specific app you want to open, you can look inside that app's .apk for the <intent-filter> elements, as explained in Launch custom android application from android browser. Then craft the appropriate URL to pass to navigateToUrl().

Another possibility is to get the package name for the app you want to open and set that as the component= section of your URL. Fair warning, I'm not actually sure if that will work.

If you don't know what app you want to open at compile-time, it's harder (e.g. if you have a server-side list of applications that your AIR app may need to invoke). Launch an application from another application on Android shows how to launch an application if you only know the package name, but you'll need a native extension to enable that functionality.

这篇关于通过Adobe Air Application启动Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆