Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/183.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android NFC:Beam未完成_Android_File_Share_Nfc - Fatal编程技术网

Android NFC:Beam未完成

Android NFC:Beam未完成,android,file,share,nfc,Android,File,Share,Nfc,我试图通过NFC将带有自定义扩展名的文件发送到另一台设备,但我总是收到“光束未完成”消息 我实现了NfcAdapter.CreateBeamUrisCallback,得到了一个像这样的文件URIfile:///storage/emulated/0/Download/wfmNFCShare.wfm。 该文件存储在根据获取的公用文件夹中。ES文件资源管理器指示文件可读 此外,通过蓝牙共享文件也可以正常工作(其他设备接收文件) AndroidManifest中的相关内容: <uses-permi

我试图通过NFC将带有自定义扩展名的文件发送到另一台设备,但我总是收到“光束未完成”消息

我实现了
NfcAdapter.CreateBeamUrisCallback
,得到了一个像这样的文件URI
file:///storage/emulated/0/Download/wfmNFCShare.wfm
。 该文件存储在根据获取的公用文件夹中。ES文件资源管理器指示文件可读

此外,通过蓝牙共享文件也可以正常工作(其他设备接收文件)

AndroidManifest中的相关内容:

<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />

<uses-feature
    android:name="android.hardware.nfc"
    android:required="false" />

 <activity
        android:name=".activities.WFMReceiverActivity"
        android:label="@string/recieve_activity"
        android:excludeFromRecents="true">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />

            <data
                android:mimeType="application/*"
                android:scheme="file"
                android:host="*"
                android:pathPattern=".*\\.wfm" />

        </intent-filter>
        <intent-filter>
            <action android:name="android.nfc.action.NDEF_DISCOVERED" />
            <category android:name="android.intent.category.DEFAULT" />
            <data
                android:mimeType="application/*"
                android:scheme="file"
                android:host="*"
                android:pathPattern=".*\\.wfm" />
        </intent-filter>
</activity>


有人能帮我解决这个问题吗?

你在这里查过吗:?有一个指向某个示例代码的链接。@pizzaani是的,我检查了该链接。文章的最后一条评论也指出了“光束未完成”错误