Lines Matching defs:NfcAdapter
53 public final class NfcAdapter {
222 // Guarded by NfcAdapter.class
232 * The NfcAdapter object for each application context.
234 * NfcAdapter object.
236 static HashMap<Context, NfcAdapter> sNfcAdapters = new HashMap(); //guard by NfcAdapter.class
239 * NfcAdapter used with a null context. This ctor was deprecated but we have
241 * might throw when called on the null-context NfcAdapter.
243 static NfcAdapter sNullContextNfcAdapter; // protected by NfcAdapter.class
259 * @param event {@link NfcEvent} with the {@link NfcEvent#nfcAdapter} field set
269 * NfcAdapter#setNdefPushMessageCallback setNdefPushMessageCallback()} in order to create an
294 * @param event {@link NfcEvent} with the {@link NfcEvent#nfcAdapter} field set
327 * Returns the NfcAdapter for application context,
331 public static synchronized NfcAdapter getNfcAdapter(Context context) {
355 sNullContextNfcAdapter = new NfcAdapter(null);
359 NfcAdapter adapter = sNfcAdapters.get(context);
361 adapter = new NfcAdapter(context);
385 * NfcAdapter adapter = manager.getDefaultAdapter();</pre>
390 public static NfcAdapter getDefaultAdapter(Context context) {
409 * Legacy NfcAdapter getter, always use {@link #getDefaultAdapter(Context)} instead.<p>
411 * for many NFC API methods. Those methods will fail when called on an NfcAdapter
417 public static NfcAdapter getDefaultAdapter() {
422 Log.w(TAG, "WARNING: NfcAdapter.getDefaultAdapter() is deprecated, use " +
423 "NfcAdapter.getDefaultAdapter(Context) instead", new Exception());
425 return NfcAdapter.getNfcAdapter(null);
428 NfcAdapter(Context context) {
524 return NfcAdapter.STATE_OFF;
617 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
618 * if (nfcAdapter == null) return; // NFC not available on this device
619 * nfcAdapter.setBeamPushUris(new Uri[] {uri1, uri2}, this);
697 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
698 * if (nfcAdapter == null) return; // NFC not available on this device
699 * nfcAdapter.setBeamPushUrisCallback(callback, this);
767 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
768 * if (nfcAdapter == null) return; // NFC not available on this device
769 * nfcAdapter.setNdefPushMessage(ndefMessage, this);
874 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
875 * if (nfcAdapter == null) return; // NFC not available on this device
876 * nfcAdapter.setNdefPushMessageCallback(callback, this);
950 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
951 * if (nfcAdapter == null) return; // NFC not available on this device
952 * nfcAdapter.setOnNdefPushCompleteCallback(callback, this);
1003 * for both the {@link NfcAdapter#ACTION_NDEF_DISCOVERED} and
1004 * {@link NfcAdapter#ACTION_TAG_DISCOVERED}. Since {@link NfcAdapter#ACTION_TECH_DISCOVERED}
1013 * {@link NfcAdapter#ACTION_TAG_DISCOVERED} intent.
1026 * {@link NfcAdapter#ACTION_TECH_DISCOVERED} intent
1196 * if (!nfcAdapter.isEnabled()) {
1198 * } else if (!nfcAdapter.isNdefPushEnabled()) {
1249 throw new UnsupportedOperationException("You need a context on NfcAdapter to use the "