Page 181 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 181

if (formatable != null) {

                                                    try {

                                                            formatable.connect();
                                                            formatable.format(message);
                                                    } catch (IOException ex) {

                                                            ex.printStackTrace();

                                                    }
                                            }



                                            return false;

                                    }
                            } catch (Exception ex) {
                                    ex.printStackTrace();




                                    return false;
                            }



                            return true;

                    }





            ReadActivity.java (NFC 태그  읽기)



            먼저  NFC 관련  객체들을  생성해줍니다.
            public class ReadActivity extends ActionBarActivity {

                    TextView readResult;



                    private NfcAdapter mAdapter;
                    private PendingIntent mPendingIntent;

                    private IntentFilter[] mFilters;

                    private String[][] mTechLists;


                    public static final int TYPE_TEXT = 1;




                                                         -  174  -
   176   177   178   179   180   181   182   183   184   185   186