【问题标题】:Can an app resident on Google TV determine what other apps are resident on the platform驻留在 Google TV 上的应用能否确定平台上驻留的其他应用
【发布时间】:2012-04-19 23:20:05
【问题描述】:

您好,我正在寻找有关我在 Google TV 上创建和安装的应用程序如何确定平台上的其他应用程序的一些见解。如果我的应用程序确定盒子上还有哪些其他应用程序,我的应用程序可以启动它们吗?是否可以指示我的应用通过 anymot 协议启动它们?

【问题讨论】:

    标签: android google-tv


    【解决方案1】:

    驻留在 Google TV 上的应用能否确定平台上驻留的其他应用

    如果这是一个标准的 Android 应用,您可以使用标准的 Android PackageManager 来识别设备上的其他内容,无论是手机、平板电脑还是 Google TV。

    如果我的应用确定盒子上还有哪些其他应用,我的应用可以启动它们吗?

    使用getLaunchIntentForPackage() 获取适合与startActivity() 一起使用的Intent 以启动特定包。

    是否可以指示我的应用通过 anymot 协议启动它们?

    我不知道那个,抱歉。

    【讨论】:

      【解决方案2】:

      请参阅Open another application from your own (intent),了解如何获得启动应用程序的意图。对于 Anymote,您需要使用 intent.toUri(Intent.URI_INTENT_SCHEME) 将意图转换为 uri 字符串。然后使用带有该 uri 的 Anymote 发送消息在 Google TV 设备上启动应用程序。请参阅 Able Remote 应用了解其工作原理。

      【讨论】:

        猜你喜欢
        • 2016-12-03
        • 2016-12-13
        • 1970-01-01
        • 2015-11-05
        • 1970-01-01
        • 2016-08-30
        • 2020-12-03
        • 2011-05-19
        • 2015-04-26
        相关资源
        最近更新 更多