android - How to read NFC tags to prevent system dialogs NFC starter list and Tags being displayed -
i working on nfc rfid tag reading application needs read nfc id number , write edittext in not main activity. nfc reading 1 of hundred functions in app. when test on panasonic dl1 cell phone , when touch nfc tag phone first time phone displays me dialog app choice handle - 2 app shown "tags" , "starter list nfc". if choose starter list nfc taken through long process of registering ic card , naming , - picking app should start automatically on when tag close. if choose tags - display "tag unknown" comment in list. application has these features , filters:
<activity android:name="pl.infis.spedycja.activities.loginactivity" android:label="@string/app_name" android:theme="@style/infistheme" android:windowsoftinputmode="stateunspecified|adjustpan" > <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> <intent-filter> <action android:name="android.nfc.action.tag_discovered" /> <category android:name="android.intent.category.default" /> <data android:mimetype="text/plain" /> </intent-filter> </activity>
is there possibility walk around system dialog , make way : when application running , when bring nfc tag close phone (no matter if first or second time) , activity started , displays nfc tag id in edit text , thats ? p.s tried adding filter non-launcher activity didn't respond - responded launcher activity
the way it, design baseactivity
class enables nfc foreground dispatching. whenever receives nfc intent in onnewintent()
, retrieves id of tag , starts relevant activity intent contains id value.
i derive app activities class. whenever nfc tag scanned while app running, receive nfc intent automatically , dispatch desired activity (which can show tag id).
Comments
Post a Comment