I'm developing an android application with vue/capacitor/ionic where the user can scan NFC tags.
I'm receiving this error and cannot find anything to solve it:
NFC permission required: Neither user 10711 nor current process has android.permission.NFC.
I have already added <uses-permission android:name="android.permission.NFC" /> to my AndroidManifest.xml. To my knowledge this should allow permission but it doesn't..?
Any help is greatly appreciated.
Further code if necessary:
<script setup>
import 'normalize.css';
import router from '../router';
import { Nfc, NfcUtils, NfcTagTechType } from '@capawesome-team/capacitor-nfc';
import { Capacitor } from '@capacitor/core';
const read = async () => {
return new Promise((resolve) => {
Nfc.addListener('nfcTagScanned', async (event) => {
await Nfc.stopScanSession();
resolve(event.nfcTag);
});
Nfc.startScanSession();
});
};
</script>