我知道可以通过Intent调用与本机Android组件进行通信,但我正试图弄清楚如何通过Adobe Air应用程序启动应用程序(已安装)。
目前,感谢Ben,我知道......
'use strict';
var mdmApp = angular.module('mdmApp', ['ngRoute', 'ngResource', 'ngMessages', 'ui.grid', 'ui.grid.pagination',
'ui.grid.moveColumns', 'ui.grid.resizeColumns', 'ui.grid.selection', 'ui.grid.autoResize',
'ui.grid.cellNav', 'ui.grid.exporter', '720kb.datepicker','angularjs-dropdown-multiselect']);
mdmApp.config(function($routeProvider) {
$routeProvider.when('/dataCollection', {
templateUrl : '2_dataCollections/dataCollection.html',
controller : "dataCollectionController"
})
.when('/reportTypeEntityList/:id', {
templateUrl : '2_dataCollections/reportTypeEntityList.html',
controller : 'reportListController',
resolve : {
formType : function() {
return 'REPORTTYPEENTITYLIST';
}
}
})
...通过Air应用程序启动Android设置菜单,非常棒。
但是我试图启动一个应用程序...而且我相信这个秘密存在于" component = com.android.settings / .Settings;"片段。有人知道如何修改此代码以在设备上启动已安装的应用程序吗?
我的王国回答。我已经在互联网上搜索了几天。
布拉德
答案 0 :(得分:2)
这取决于您的使用案例。
如果您要打开一个特定应用,则可以查看该应用的.apk中的<intent-filter>
元素,如Launch custom android application from android browser中所述。然后制作适当的网址以传递给navigateToUrl()
。
另一种可能性是获取您要打开的应用的包名称,并将其设置为您网址的component=
部分。公平的警告,我不确定这是否会奏效。
如果您不知道要在编译时打开哪个应用程序,则更难(例如,如果您有AIR应用程序可能需要调用的服务器端应用程序列表)。 Launch an application from another application on Android显示了如果您只知道软件包名称,如何启动应用程序,但您需要一个本机扩展来启用该功能。