如何列出匹配意图哪些活​​动? [英] How to list Activities which match an intent?

查看:143
本文介绍了如何列出匹配意图哪些活​​动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这都是通过一个主应用程序纯粹是推出了一些单独的应用程序。

我想知道如果我能够使用意图来检索所有符合一些意向发现其子应用程序列表。

主要应用目前需要知道使用什么样的意图来启动这些子应用,但有使用意向,看看是否有其他活动的设备匹配了一套意向过滤器的方法吗?


解决方案

  

我想知道如果我能够使用
  意图要检索的所有列表
  匹配其中一些子应用
  发现意图。


当然可以。使用软件包管理系统,也可能是 queryIntentActivities()的方法,来实现自己的目标。

I have a few separate applications which are all launched purely through a main application.

I am wondering if I'd be able to use intents to retrieve a list of all the sub-applications which match some discovery intent.

The main application currently needs to know what Intents to use to START these sub-applications, but is there a way to use intents to see if other Activities on the device match a set of intent-filters?

解决方案

I am wondering if I'd be able to use intents to retrieve a list of all the sub-applications which match some discovery intent.

Absolutely. Use PackageManager, and probably the queryIntentActivities() method, to achieve your goals.

这篇关于如何列出匹配意图哪些活​​动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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