隐式意图到非内置应用 [英] Implicit Intent to a non built-in app

查看:114
本文介绍了隐式意图到非内置应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的Andr​​oid开发。
我需要建立一个简单的应用程序会调用按钮后,另一个应用是pressed。

I am new to Android development. I need to build a simple app which calls another app after the button is pressed.

要放东西更清楚。
我需要一个按钮preSS调用打开一个全景捕获应用程序的意图。
我在我的情况下 360全景

然而,当我提到文件,它说我们必须验证应用程序是否有接收意向。我不知道如何做到这一点。

However when I referred to this document, it says we must verify whether the app has a receiving intent. I don't understand how to do that.

此外,如果这是可能的..这是开放360全景,是不是也有可能是一旦我点击我的应用程序按钮,拍摄会自动启动,而无需实际pressing 360全景拍摄按钮?

Also if this is possible.. That is opening 360 Panorama, is it also possible that once I click the button in my app, the capture starts automatically without actually pressing the capture button in 360 Panorama?

推荐答案

要检查是否已安装在设备上的活动可以接收的意图,使用这样的:

To check if an activity installed on your device can receive the intent, use something like this:

if (intent.resolveActivity(getPackageManager()) != null) {
        startActivity(intent);
    }   else  {
        Log.d(TAG, "No activity available to handle Intent.");
    }

这篇关于隐式意图到非内置应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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