Showing posts with label API Level 10. Show all posts
Showing posts with label API Level 10. Show all posts

How to Register an Activity that Responds to NFC tags for URI's that point to a URL

This will register an Activity that will respond only to NFC tags that correspond to a URI that points a website (URL).
ACTION_NDEF_DISCOVERED(added in API level 10) is an Intent to start an activity when a tag with NDEF payload is discovered.

1. Add a new activity to your AndroidManifest.xml file. You may add it below  a closing (</activity) tag.

<activity android:name=".BlogViewer">
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http:"
   android:host="androidsbs.blogspot.com"/>
</intent-filter>
</activity>

2. Compile and run!

Resources:Professional Android 4 Application Development by Reto Meier, pg 694
http://developer.android.com/reference/android/nfc/NfcAdapter.html#ACTION_NDEF_DISCOVERED

android:scrollbarSize

added in API Level 1(but not working, BUG),  (fixed in API Level 10)

android:scrollbarSize: Set the width of vertical scrollbars and height of horizontal scrollbars.

Ensure to change the minSDKVersion to 10, or greater.

       android:scrollbarSize = "20px"

Related Articles:

Resources:
http://developer.android.com/reference/android/view/View.html#attr_android:scrollbarSize
http://developer.android.com/reference/android/R.attr.html#scrollbarSize
https://code.google.com/p/android/issues/detail?id=14317
http://en.wikipedia.org/wiki/Android_version_history