【问题标题】:Oculus Go file association with intent filterOculus Go 文件关联与意图过滤器
【发布时间】:2019-12-15 22:11:51
【问题描述】:

我希望我的类型 (.xxx) 的所有文件都可以在 Oculus Go 上使用我的应用程序打开。

为此,我在我的 AndroidManifest.xml 文件中尝试了很多东西。目前,我在主要活动中拥有所有这些意图过滤器:

      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="http" />
        <data android:host="*" />
        <data android:pathPattern=".*\\.xxx" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.BROWSABLE" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="file" />
        <data android:host="*" />
        <data android:pathPattern=".*\\.xxx" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="application/x-compressed" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="application/x-zip-compressed" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="application/zip" />
      </intent-filter>
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:mimeType="multipart/x-zip" />
      </intent-filter>

具有 mime 类型的 4 个意图过滤器用于 zip 文件。这是因为我的文件类型是“.zip”文件重命名为“.xxx”。

我已经使用 oculus 浏览器下载了一个 .xxx 文件,然后在右侧面板上单击它。没啥事儿 ... 我还尝试了一个 zip 文件。什么都没发生……

是否可以在 Oculus Go 上进行文件关联? 难道我做错了什么 ? 提前致谢。

【问题讨论】:

    标签: android android-intent android-manifest intentfilter oculusgo


    【解决方案1】:

    TL;DR 不,目前尚不支持。

    Oculus 浏览器不会为下载的项目启动 Intent。它确实打开了视频文件;它将视频文件作为一种特殊情况处理。

    【讨论】:

    • 很抱歉在这里打扰您,但是由于您似乎知道该主题,而我无法在其他地方获得任何信息:此功能是否有 ETA,或者它是什么Go/Quest 等 Oculus 平台不太可能很快提供给开发者?
    • 对不起,我什么都没有。
    • 原帖发布一年半后,oculus上文件关联有消息了吗?
    猜你喜欢
    • 2011-04-15
    • 2011-05-08
    • 2013-03-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-11
    • 2012-08-28
    • 2019-01-21
    相关资源
    最近更新 更多