일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Android
- Retrofit2
- andorid studio
- RxJava2
- RXjava
- 안드로이드
- deprecating the install_referrer
- Switch to the Play Referrer API by March 1
- 하드코드검색
- android P
- RX
- rxandroid
- java
- hardcoded string search
- Rx자바
Archives
- Today
- Total
Lucky Dog
[안드로이드] NFC fillter prommatically 본문
IntentFilter intentFilter_1 = new IntentFilter(); intentFilter_1.addAction(NfcAdapter.ACTION_NDEF_DISCOVERED); try { intentFilter_1.addDataType("*/*"); } catch (MalformedMimeTypeException e) { e.printStackTrace(); } IntentFilter intentFilter_2 = new IntentFilter(); intentFilter_2.addAction(NfcAdapter.ACTION_TECH_DISCOVERED); try { intentFilter_2.addDataType("*/*"); } catch (MalformedMimeTypeException e) { e.printStackTrace(); } IntentFilter intentFilter_3 = new IntentFilter(); intentFilter_3.addAction(NfcAdapter.ACTION_TAG_DISCOVERED); try { intentFilter_3.addDataType("*/*"); } catch (MalformedMimeTypeException e) { e.printStackTrace(); } IntentFilter[] intentFilters = new IntentFilter[]{intentFilter_1, intentFilter_2, intentFilter_3}; String[][] techLists = new String[][]{ new String[]{MifareUltralight.class.getName(), Ndef.class.getName(), NfcA.class.getName(), NfcB.class.getName(), NfcF.class.getName(), NfcV.class.getName(), IsoDep.class.getName(), NdefFormatable.class.getName()}, new String[]{MifareClassic.class.getName(), Ndef.class.getName(), NfcA.class.getName(), NfcB.class.getName(), NfcF.class.getName(), NfcV.class.getName(), IsoDep.class.getName(), NdefFormatable.class.getName()} }; mNfcAdapter.enableForegroundDispatch(this, pIntent, intentFilters, techLists); registerReceiver(mNFCReceiver, intentFilter); |
Comments