Thursday, 16 October 2014 15:37

Leveraging the technology in your Mobile apps - NFC 2/2 -

2nd glance of NFC - Leveraging the technology in your Mobile apps
Read/write data from the NFC tag is available at the current version of Appeon. Two methods can be used to implement such functionality.
One is read/write data in NDEF and the other is Read/write data in bytes from blocks.
We have released a sample code of method 1 in another post.
Today we are going to unveil a sample code for method 2: 
  eon_mobile_nfcex   Inv_mobile_nfc  //create nfc object  
eon_mobile_str_nfcrecord      istr_nfcrecord    

//open nfc object
  Inv_mobile_nfc.of_open()    

//if necessary  
Inv_mobile_nfc.of_setTimeout(li_timeout)  
Inv_mobile_nfc.of_setkey(ls_key)    

Inv_mobile_nfc.of_startBlockOperate()    

//read nfc tag record  
Inv_mobile_nfc.of_readBlock(li_block,ibl_data)    

//write nfc tag record  
Inv_mobile_nfc.of_writeBlock(li_block,ibl_data)    

Inv_mobile_nfc.of_stopBlockOperate()    

//close nfc object  
Inv_mobile_nfc.of_close()   

Source: Appeon Newsletter

Read 7589 times