The URL works fine and I tested in Android. I have three URL’s, the first is get data from drop down list and show it in fiedsl, the second is post data after changing, the third is get data from DB after read NFC tags and validate if it is existed.
API works fine and configured correctly.
when I debug the windows 10 app I got the previous error as seen in the picture above. In this case I cannot select form drop down list and modify or NFC read data.
Yes, I upgrade angular to 4.4, which is support HttpClient. When I use HttpClient the app become white screen.
NFC reader page to read NFC tags and get the similar from DB. The NFC reader is below.
this.nfc.addNdefListener().subscribe(data => {
if (data || data.tag || data.tag.id) {
let tagId = this.nfc.bytesToHexString(data.tag.id).toString();
//Check if the read NFC tag is existed in DB or not.
if (tagId) {
this.checkTagInDB(tagId);
//this.checkTagInDB(tagId);
let toast = this.toastCtrl.create({
message: 'NFC Tag found: ' + tagId,
duration: 4000,
position: 'top'
});
toast.present();
let payload = data.tag.ndefMessage[0].payload;
let tagConintent = this.nfc.bytesToString(payload).substring(3);
} else {
let toast = this.toastCtrl.create({
message: 'NFC Tag not found',
duration: 4000,
position: 'top'
});
toast.present();
}
}
});
The get function for selecting values. onNFCData() function call form constructo
Please edit your post, it is not very readable at the moment.
Use the </> button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ``` manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.
Your question has absolutely nothing to do with Ionic Native and the NFC plugin, right? It is just about sending some random data to a server?
If so, please just open a new topic in the correct “ionic” category and include all the necessary information. And please format your code properly, you again posted it as a comment.
No, it is not like this. My app read NFC tags. The tag will be checked if it is already existed in the DB or not. If yes, then the data will be shown in the fields below. Otherwise, the new NFC tag will be added automatically to DB.
NFC plugin is the most important part in my app.
Therefore, I did two pages, one is to modify the stored data in DB by reading it directly, second is to read NFC tags using NFC listener in Constructor and show the data directly after check the ID if it is existed in DB.
That may well be - but your problem has nothing to do with NFC or the Ionic Native NFC plugin.
You are trying to send some data to a remote endpoint and this is not working. This is a pure Ionic/Angular problem. NFC is not relevant here.
This whole topic was focused on NFC. Your problem has nothing to do with NFC. Just create a new topic and ask your question again. Leave the NFC stuff out, include your ionic info and code from the beginning.
Trying to collect the interesting bits here is now almost impossible and I won’t do it. Create a new topic and post its URL here, then I will have another look.
I don’t know yet as we haven’t really looked at the real problem yet. We can do that in a new topic.