]> www.average.org Git - YkNeoCR.git/blobdiff - src/org/average/nfcauthcr/Check.java
Revert "Merge branch 'master' of ssh://git.average.org/~/NFCAuthCR"
[YkNeoCR.git] / src / org / average / nfcauthcr / Check.java
index 1fc5ceaf00f36d497b5cae113390f2361d4d7bf6..36f3b1d8fe17cdb342a25ae85eb90ea56be7f30a 100644 (file)
@@ -89,6 +89,27 @@ public class Check extends Activity {
                return builder.create();
        }
 
                return builder.create();
        }
 
+/*
+<receiver android:name=".IsoDepReceiver"
+          android:label="IsoDepReceiver">
+     <intent-filter>
+         <action android:name="android.nfc.action.TECH_DISCOVERED" />
+     </intent-filter>
+
+     <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
+         android:resource="@xml/filter_nfc"
+     />
+ </receiver>
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+     <!-- capture anything using IsoDep -->
+     <tech-list>
+         <tech>android.nfc.tech.IsoDep</tech>
+     </tech-list>
+ </resources>
+
+*/
+
        private void enableDispatch(int slot) {
                Intent intent = getIntent();
                intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
        private void enableDispatch(int slot) {
                Intent intent = getIntent();
                intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
@@ -101,13 +122,11 @@ public class Check extends Activity {
                        Toast.makeText(this, R.string.no_nfc,
                                                Toast.LENGTH_LONG).show();
                        finish();
                        Toast.makeText(this, R.string.no_nfc,
                                                Toast.LENGTH_LONG).show();
                        finish();
-                       return;
                }
                if (! adapter.isEnabled()) {
                        Toast.makeText(this, R.string.nfc_disabled,
                                                Toast.LENGTH_LONG).show();
                        finish();
                }
                if (! adapter.isEnabled()) {
                        Toast.makeText(this, R.string.nfc_disabled,
                                                Toast.LENGTH_LONG).show();
                        finish();
-                       return;
                }
                adapter.enableForegroundDispatch(
                        this, tagIntent, new IntentFilter[] {iso},
                }
                adapter.enableForegroundDispatch(
                        this, tagIntent, new IntentFilter[] {iso},