Avslutning
https://developer.android.com/guide/topics/connectivity/nfc/nfc.html
Begynnelsen på IoT!
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http"
android:host="developer.android.com"
android:pathPrefix="/index.html" />
</intent-filter>
Starter Activity-en med et intent
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="text/plain"/>
</intent-filter>https://developer.android.com/guide/topics/connectivity/nfc/nfc.html
String action = getIntent().getAction();
if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(action)
|| NfcAdapter.ACTION_TAG_DISCOVERED.equals(action)) {
Tag tag = getIntent().getParcelableExtra(NfcAdapter.EXTRA_TAG);
MifareUltralight ultralight = MifareUltralight.get(tag);
// ...ultralight.connect();
byte[] payload = ultralight.readPages(8);
payloadTextView.setText(new String(payload));
https://play.google.com/store/apps/details?id=com.wakdev.wdnfc&hl=en
13. juni
Skriftlig skoleeksamen (3 timer)
Spørsmål fra hele pensum
Ser etter forståelse!
Samme form som tidligere eksamensoppgaver