@@ -82,17 +82,16 @@ public final class NfcAdapter {
8282 * for this action and specify the desired tech types in a
8383 * manifest <code>meta-data</code> entry. Here is an example manfiest entry:
8484 * <pre>
85- * <activity android:name=".nfc.TechFilter" android:label="NFC/TechFilter">
86- * <!-- Add a technology filter -->
87- * <intent-filter>
88- * <action android:name="android.nfc.action.TECH_DISCOVERED" />
89- * </intent-filter>
90- *
91- * <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
92- * android:resource="@xml/filter_nfc"
93- * />
94- * </activity>
95- * </pre>
85+ * <activity android:name=".nfc.TechFilter" android:label="NFC/TechFilter">
86+ * <!-- Add a technology filter -->
87+ * <intent-filter>
88+ * <action android:name="android.nfc.action.TECH_DISCOVERED" />
89+ * </intent-filter>
90+ *
91+ * <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
92+ * android:resource="@xml/filter_nfc"
93+ * />
94+ * </activity></pre>
9695 *
9796 * <p>The meta-data XML file should contain one or more <code>tech-list</code> entries
9897 * each consisting or one or more <code>tech</code> entries. The <code>tech</code> entries refer
@@ -121,8 +120,7 @@ public final class NfcAdapter {
121120 * <tech>android.nfc.tech.MifareClassic</tech>
122121 * <tech>android.nfc.tech.Ndef</tech>
123122 * </tech-list>
124- * </resources>
125- * </pre>
123+ * </resources></pre>
126124 *
127125 * <p>This intent is started after {@link #ACTION_NDEF_DISCOVERED} and before
128126 * {@link #ACTION_TAG_DISCOVERED}. If any activities respond to {@link #ACTION_NDEF_DISCOVERED}
@@ -385,10 +383,9 @@ private static INfcAdapter getServiceInterface() {
385383 * Most Android devices will only have one NFC Adapter (NFC Controller).
386384 * <p>
387385 * This helper is the equivalent of:
388- * <pre>{@code
386+ * <pre>
389387 * NfcManager manager = (NfcManager) context.getSystemService(Context.NFC_SERVICE);
390- * NfcAdapter adapter = manager.getDefaultAdapter();
391- * }</pre>
388+ * NfcAdapter adapter = manager.getDefaultAdapter();</pre>
392389 * @param context the calling application's context
393390 *
394391 * @return the default NFC adapter, or null if no NFC adapter exists
@@ -623,8 +620,7 @@ public boolean disable() {
623620 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
624621 * if (nfcAdapter == null) return; // NFC not available on this device
625622 * nfcAdapter.setBeamPushUris(new Uri[] {uri1, uri2}, this);
626- * }
627- * </pre>
623+ * }</pre>
628624 * And that is it. Only one call per activity is necessary. The Android
629625 * OS will automatically release its references to the Uri(s) and the
630626 * Activity object when it is destroyed if you follow this pattern.
@@ -704,8 +700,7 @@ public void setBeamPushUris(Uri[] uris, Activity activity) {
704700 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
705701 * if (nfcAdapter == null) return; // NFC not available on this device
706702 * nfcAdapter.setBeamPushUrisCallback(callback, this);
707- * }
708- * </pre>
703+ * }</pre>
709704 * And that is it. Only one call per activity is necessary. The Android
710705 * OS will automatically release its references to the Uri(s) and the
711706 * Activity object when it is destroyed if you follow this pattern.
@@ -758,14 +753,13 @@ public void setBeamPushUrisCallback(CreateBeamUrisCallback callback, Activity ac
758753 *
759754 * <p>If you want to prevent the Android OS from sending default NDEF
760755 * messages completely (for all activities), you can include a
761- * < code>< meta-data></code> element inside the < code>< application></code>
756+ * {@ code < meta-data>} element inside the {@ code < application>}
762757 * element of your AndroidManifest.xml file, like this:
763- * <pre>{@code
764- * <application ...>
765- * <meta-data android:name="android.nfc.disable_beam_default"
766- * android:value="true" />
767- * </application>
768- * }</pre>
758+ * <pre>
759+ * <application ...>
760+ * <meta-data android:name="android.nfc.disable_beam_default"
761+ * android:value="true" />
762+ * </application></pre>
769763 *
770764 * <p>The API allows for multiple activities to be specified at a time,
771765 * but it is strongly recommended to just register one at a time,
@@ -776,8 +770,7 @@ public void setBeamPushUrisCallback(CreateBeamUrisCallback callback, Activity ac
776770 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
777771 * if (nfcAdapter == null) return; // NFC not available on this device
778772 * nfcAdapter.setNdefPushMessage(ndefMessage, this);
779- * }
780- * </pre>
773+ * }</pre>
781774 * And that is it. Only one call per activity is necessary. The Android
782775 * OS will automatically release its references to the NDEF message and the
783776 * Activity object when it is destroyed if you follow this pattern.
@@ -857,14 +850,13 @@ public void setNdefPushMessage(NdefMessage message, Activity activity,
857850 *
858851 * <p>If you want to prevent the Android OS from sending default NDEF
859852 * messages completely (for all activities), you can include a
860- * < code>< meta-data></code> element inside the < code>< application></code>
853+ * {@ code < meta-data>} element inside the {@ code < application>}
861854 * element of your AndroidManifest.xml file, like this:
862- * <pre>{@code
863- * <application ...>
864- * <meta-data android:name="android.nfc.disable_beam_default"
865- * android:value="true" />
866- * </application>
867- * }</pre>
855+ * <pre>
856+ * <application ...>
857+ * <meta-data android:name="android.nfc.disable_beam_default"
858+ * android:value="true" />
859+ * </application></pre>
868860 *
869861 * <p>The API allows for multiple activities to be specified at a time,
870862 * but it is strongly recommended to just register one at a time,
@@ -875,8 +867,7 @@ public void setNdefPushMessage(NdefMessage message, Activity activity,
875867 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
876868 * if (nfcAdapter == null) return; // NFC not available on this device
877869 * nfcAdapter.setNdefPushMessageCallback(callback, this);
878- * }
879- * </pre>
870+ * }</pre>
880871 * And that is it. Only one call per activity is necessary. The Android
881872 * OS will automatically release its references to the callback and the
882873 * Activity object when it is destroyed if you follow this pattern.
@@ -941,8 +932,7 @@ public void setNdefPushMessageCallback(CreateNdefMessageCallback callback, Activ
941932 * NfcAdapter nfcAdapter = NfcAdapter.getDefaultAdapter(this);
942933 * if (nfcAdapter == null) return; // NFC not available on this device
943934 * nfcAdapter.setOnNdefPushCompleteCallback(callback, this);
944- * }
945- * </pre>
935+ * }</pre>
946936 * And that is it. Only one call per activity is necessary. The Android
947937 * OS will automatically release its references to the callback and the
948938 * Activity object when it is destroyed if you follow this pattern.
@@ -1190,8 +1180,7 @@ public boolean disableNdefPush() {
11901180 * } else if (!nfcAdapter.isNdefPushEnabled()) {
11911181 * startActivity(new Intent(Settings.ACTION_NFCSHARING_SETTINGS));
11921182 * }
1193- * }
1194- * </pre>
1183+ * }</pre>
11951184 *
11961185 * @see android.provider.Settings#ACTION_NFCSHARING_SETTINGS
11971186 * @return true if NDEF Push feature is enabled
0 commit comments