gpt4 book ai didi

android - 为 NFC Intent 声明自定义 mimeType

转载 作者:行者123 更新时间:2023-11-29 17:54:23 25 4
gpt4 key购买 nike

是否可以为 NDEF_DISCOVERED 设置自定义 mimeType?

        <intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" />
</intent-filter>

我想要一个自定义的 mimeType,例如

<data android:mimeType="customType" />

最佳答案

当然。在 this sample project ,我使用:

<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="application/vnd.commonsware.sample.webbeam"/>
</intent-filter>

关于android - 为 NFC Intent 声明自定义 mimeType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20529132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com