Closed KBepo closed 6 years ago
I did as the directions stated and it worked for me.
In res/xml
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<tech-list>
<tech>android.nfc.tech.MifareClassic</tech>
</tech-list>
</resources>
In manifest
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
</intent-filter>
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
In manifest outside application
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.INTERNET" />
@smitch88 What did you name the .xml file in app/src/main/res/
? I titled mine nfc_tech_filter.xml
as KBepo did and I'm getting the same error.
@Mimble-Wimble I think you are missing .../xml perhaps. Here is where I have it,
I also only target a specific set of tag types as an OR
by doing something like...if you list them out in a single tech-list
it will assume its an AND
so unless your tag can identify as all the types it would not work.
@smitch88 Thanks for this! That's exactly what was needed. Adding the xml/
directory and placing nfc_tech_filter.xml
in there resolved the previous error.
@Mimble-Wimble @KBepo So this can be closed?
@henrikra Yep. All good here.
Hello,
I've been following instructions and even used example to include this into my project but i keep getting this error:
No resource found that matches the given name (at 'resource' with value '@xml/nfc_tech_filter')
I've made a new folder named xml inside res folder and I've placed nfc_tech_filter.xml from instructions. But can't make it work. What did I miss?