java - Cannot invoke getRecords(int) on the array type -


i cannot seem past error no matter try - i've tried removing int values (as seems should) leads more compiler errors.

any suggestions?

 void processintent(intent intent) {         parcelable[] rawmsgs = intent.getparcelablearrayextra(                 nfcadapter.extra_ndef_messages);     // 1 message sent during beam     ndefmessage[] msg =  new ndefmessage[rawmsgs.length];     (int = 0; < msg.length; i++) {         msg[i] = (ndefmessage) rawmsgs[i];         // record 0 contains mime type, record 1 aar, if present         beammsg.settext(new string(msg.getrecords(1).getpayload()));         beammsg2.settext(new string(msg.getrecords(1).getpayload()));     }} 

from quick glance @ documentation located here appears syntax off.

to reference specific record index code should following

msg.getrecords()[1].getpayload() 

although there logic error , should calling msg[i] so

msg[i].getrecords()[1].getpayload() 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -