Home | History | Annotate | Download | only in nfc

Lines Matching defs:NfcAdapter

56 public final class NfcAdapter {
286 // Guarded by NfcAdapter.class
297 * The NfcAdapter object for each application context.
299 * NfcAdapter object.
301 static HashMap<Context, NfcAdapter> sNfcAdapters = new HashMap(); //guard by NfcAdapter.class
304 * NfcAdapter used with a null context. This ctor was deprecated but we have
306 * might throw when called on the null-context NfcAdapter.
308 static NfcAdapter sNullContextNfcAdapter; // protected by NfcAdapter.class
317 * NfcAdapter#enableReaderMode} and disable it with {@link
318 * NfcAdapter#disableReaderMode}.
319 * @see NfcAdapter#enableReaderMode
336 * @param event {@link NfcEvent} with the {@link NfcEvent#nfcAdapter} field set
346 * NfcAdapter#setNdefPushMessageCallback setNdefPushMessageCallback()} in order to create an
371 * @param event {@link NfcEvent} with the {@link NfcEvent#nfcAdapter} field set
404 * Returns the NfcAdapter for application context,
408 public static synchronized NfcAdapter getNfcAdapter(Context context) {
439 sNullContextNfcAdapter = new NfcAdapter(null);
443 NfcAdapter adapter = sNfcAdapters.get(context);
445 adapter = new NfcAdapter(context);
469 * NfcAdapter adapter = manager.getDefaultAdapter();</pre>
474 public static NfcAdapter getDefaultAdapter(Context context) {
493 * Legacy NfcAdapter getter, always use {@link #getDefaultAdapter(Context)} instead.<p>
495 * for many NFC API methods. Those methods will fail when called on an NfcAdapter
501 public static NfcAdapter getDefaultAdapter() {
506 Log.w(TAG, "WARNING: NfcAdapter.getDefaultAdapter() is deprecated, use " +
507 "NfcAdapter.getDefaultAdapter(Context) instead", new Exception());
509 return NfcAdapter.getNfcAdapter(null);
512 NfcAdapter(Context context) {
624 return NfcAdapter.STATE_OFF;
717 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
718 * if (nfcAdapter == null) return; // NFC not available on this device
719 * nfcAdapter.setBeamPushUris(new Uri[] {uri1, uri2}, this);
797 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
798 * if (nfcAdapter == null) return; // NFC not available on this device
799 * nfcAdapter.setBeamPushUrisCallback(callback, this);
867 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
868 * if (nfcAdapter == null) return; // NFC not available on this device
869 * nfcAdapter.setNdefPushMessage(ndefMessage, this);
974 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
975 * if (nfcAdapter == null) return; // NFC not available on this device
976 * nfcAdapter.setNdefPushMessageCallback(callback, this);
1050 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
1051 * if (nfcAdapter == null) return; // NFC not available on this device
1052 * nfcAdapter.setOnNdefPushCompleteCallback(callback, this);
1103 * for both the {@link NfcAdapter#ACTION_NDEF_DISCOVERED} and
1104 * {@link NfcAdapter#ACTION_TAG_DISCOVERED}. Since {@link NfcAdapter#ACTION_TECH_DISCOVERED}
1113 * {@link NfcAdapter#ACTION_TAG_DISCOVERED} intent.
1126 * {@link NfcAdapter#ACTION_TECH_DISCOVERED} intent
1333 * if (!nfcAdapter.isEnabled()) {
1335 * } else if (!nfcAdapter.isNdefPushEnabled()) {
1386 throw new UnsupportedOperationException("You need a context on NfcAdapter to use the "