두개 연동해서 내용 읽어오는건 가능한데 nfc 태그 지속시간이 정해져 있는거야?
뗐을때랑 붙였을때
protected void onResume() {
super.onResume();
if (nfcAdapter != null) {
nfcAdapter.enableForegroundDispatch(this, pendingIntent, null, null);
}
}
//붙일때
@Override
protected void onPause() {
if (nfcAdapter != null) {
nfcAdapter.disableForegroundDispatch(this);
show();
}
super.onPause();
}
이런식으로 처리하는데 붙이는 거랑 동시에 떨어지는 작업이 이루어지는데
지속시간이 있는 건지? 아니면 코드에서 처리할 수 있는지 알려줘..
참고로 지금 하는건 nfc태그를 on off 버튼처럼 쓰는거야 붙이고 있으면 on 떼면 off
댓글 0