Hii
Add the DEFAULT Category as well in the Intent filter , i think it will
work out for you
<action
android:name="android.nfc.action.TRANSACTION_DETECTED" />
<category android:name=""android.intent.category.DEFAULT " />
</intent-filter>
Well i am also working in NFC making applications on Google Nexus S ... I
think you are also working in card Emulation mode..
can you give me some pointers how to go ahead with Card Emulation
applications , actually i am struggling to get the things up.
cheers
tarun
On Thu, Feb 16, 2012 at 1:57 PM, Usman <[email protected]> wrote:
> I am struggling to handle android.nfc.action.TRANSACTION_DETECTED
> event. The device is NFC and also contains secure element which
> supports SWP to the UICC.
> I have registered the following BroadCast receiver in my app.
> public class TransactionReceiver extends BroadcastReceiver {
>
> private String TAG = "TransactionReceiver";
>
> @Override
> public void onReceive(Context context, Intent intent) {
> Log.d(TAG, "Transaction performed ...");
>
> }
>
> }
>
> Below is my manifest.
> <?xml version="1.0" encoding="utf-8"?>
> <manifest xmlns:android="http://schemas.android.com/apk/res/android"
> package="com.mycompany.android.nfc.uicc.test"
> android:versionCode="1"
> android:versionName="1.0" >
>
> <uses-sdk android:minSdkVersion="10" />
>
> <application
> android:icon="@drawable/ic_launcher"
> android:label="@string/app_name" >
> <activity
> android:name=".AndroidUiccTestActivity"
> android:label="@string/app_name" >
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
>
> <category
> android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> </activity>
>
> <receiver
> android:name=".TransactionReceiver"
> android:enabled="true" >
> <intent-filter>
> <action
> android:name="android.nfc.action.TRANSACTION_DETECTED" />
> </intent-filter>
> </receiver>
> </application>
>
> <uses-permission android:name="android.permission.NFC" />
> </manifest>
>
> I am not receiving the broadcast event when I present the device on
> the contactless reader. Could anyone point out if I am missing
> anything or if following the right route.
> The android.nfc.action.TRANSACTION_DETECTED is hidden from the google
> api but can found at
> http://www.androidjavadoc.com/2.3/android/nfc/NfcAdapter.html#ACTION_TRANSACTION_DETECTED
> .
>
> thanks in advance
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en