yashsingh1/xdaforums huggingface dataset:
[Nexus S Themes and Apps] Highland3r:
Apologies for all the spam - mostly just a braindump which may or may not help others.

@krohnjw - If you'd prefer me to PM you any comments/test results etc that's fine - concious about mucking up your thread and posting publicly any potential problems.

Few further observations:

Persistent write fails can lead to the Dalvik VM crashing which causes temporary NFC service failure. Looks like turning screen off and back on kicks things back into life (further testing required)

The issue with Bluetooth as noted in earlier post looks like it can also lead to a NFC service crash. Not exactly sure how as of yet, HOWEVER from testing so far appears to be related to two errors which need to follow each other.

After the second of the two errors, screen off & back on results in the tag writing fine (which means I have no "blank" tags to test - is there any way to format them back to factory defaults??)

If the NFC service fails, screen off/back on looks to restore it. Otherwise a reboot works fine.

The app is a breeze to use though and with the features coming in 1.4 looks like NFC has a lot of uses.

One question/possible improvement(?) - is it possible to not only launch apps but also launch activities? i.e A sports wristband could be used to start myTracks and launch the "start new track" activity (if one actually existed....)
[Nexus S Themes and Apps] krohnjw:
I've had no problems with enable bluetooth as a single command. It's a simple text string, so it's literally 1 character different than enable Wifi. E:I1 or E:I2

For the exception you are seeing that's after the card has identified itself as NDEF formated AND is connected. So we are literally looking at an IO issue within the API itself. Please send me the full logcat when this happens.

As far as NFC dying the only time I've had this happen is during development (when I would also get oom due to too many open files - thanks Eclipse). In practice with the tags I've yet to see this happen. Please include a logcat if you see this again.
[Nexus S Themes and Apps] krohnjw:
Feel free to pm me - you can catch me on Google Talk as well @ krohnjw if it's easier.

If the application in question supports incoming intents for it or "Extra" data when starting the activity then yes. It would be on an app by app basis potentially.
[Nexus S Themes and Apps] Highland3r:
Thanks for the comments.

Can't replicate the bluetooth issue anymore as all the tags now have data on them (is there any way to factory reset/clear the data on tags??)

Regarding VM death - looks like its more "user error" on my part to re-produce a death. A large number of failed writes eventually causes things to fall over (shock horror....) If you move the tag quickly past the phone when writing the write fails, repeating this eventually seems to cause the VM to die. Probably nothing to worry about (especially as most people would actually follow instructions and not be a pleb ;))
[Nexus S Themes and Apps] krohnjw:
Not that I'm aware of. This only occurred on the initial format and not subsequent writes?

Heh, it definitely has to remain over the tag until the write completes :)

With that being said this should be handled within the API ideally. Causing the VM to crash or the NFC service due to something *within* the API is really uncool in my opinion. As a developer it's not something I can catch/handle as it doesn't throw an exception (all exceptions that the write methods can throw are caught) and that is frustrating.
[Nexus S Themes and Apps] Highland3r:
Correct, tags are writing fine now.

It didn't affect the wristband tag, however with a sample size of 1 that's not a 100% reliable answer/test :P
[Nexus S Themes and Apps] krohnjw:
Small sample sizes are always the best :)

The first write formats the card to NDEF - the format function itself writes the NDEF message. All subsequent writes use the write functionality of the NDEF Tag type. Not much I can do there, but they do differ for what it's worth.

Also, 1.4 is up in the OP and published to the Market (it takes a while to propagate it seems).
[Nexus S Themes and Apps] 3Shirts:
Grrr, I have all these awesome ideas and the app keeps improving hour by hour. I just want the damn tags to arrive!
[Nexus S Themes and Apps] shrooms90:
Sounds nice, anyone's got an idea where to buy tags in switzerland?
[Nexus S Themes and Apps] krohnjw:
http://www.tagage.net/tagage-shop/

These ship to Switzerland from Finland. These are stickers (unprotected) - very thin and easy to apply (I have 1 on my laptop, 2 in my car and 1 on my desk in my office).

If you are looking for something PVC coated or laminated

http://www.rfidshop.com/30mm-mifare-1k-s50-sticker-discs-1184-p.asp

http://www.rfidshop.com/mifare-high-frequency-1356mhz-598-c.asp

This is a UK shop that ships across Europe and has quite a few options.
[Nexus S Themes and Apps] 3Shirts:
Most of the companies linked in this thread offer international shipping if you can't find a local supplier in your own country. Have a quick Google though, basically you are looking for 13.56Mhz RFID/NFC MiFare tags like these:

http://www.rfidshop.com/passive-high-frequency-1356mhz-11-c.asp

I ordered 1k size but you can get any size really, just limits how much you can store on them obviously.
[Nexus S Themes and Apps] Highland3r:
1.4 working fine so far.

Is it possible to add notification volume to the volume settings? Also is it possible for the Read Success notification be configurable (i.e on/off)?
[Nexus S Themes and Apps] krohnjw:
They don't technically have to be MiFare cards - they could be any NDF Forum Type Compliant card (Type 1-4):

Some examples from the SDK

However, the MiFare classic seem to be the most widely available and cheapest at this point.
[Nexus S Themes and Apps] krohnjw:
Notification - yes. I overlooked that entirely.

It is possible to make the toast notification a preference - I'll stick it on the list of things to do. (I'll just create a "Settings" activity from within the menu)
[Nexus S Themes and Apps] krohnjw:
1.5 up - Sorry for forgetting Notification volume - mine is always tied to ringer volume so it never even crossed my mind.
[Nexus S Themes and Apps] Highland3r:
Thanks :D

Just a quick heads up for anyone who decides to purchase the app after using the APK attached to the thread - un-install the free version first otherwise the market installation fails.
[Nexus S Themes and Apps] krohnjw:
Thanks for the note - I'll add that to the OP. If you do purchase I'd appreciate if you rate the app (be honest, I'm not peddling for 5 starts if you think it's a lackluster app).
[Nexus S Themes and Apps] krohnjw:
1.6 up - a quick bug fix for handling of keys (and all parsing) for wifi and hotspot APs (thanks to Highland3r for finding this)
[Nexus S Themes and Apps] fesar:
Another thought can we make this as a default app to read tags if so I don't need to wait for changing the options. Currently it waits for my input to say which app to open and read the tag whether tags or NFC tasks.
[Nexus S Themes and Apps] krohnjw:
Yes - my only concern would be the app then will take precedence for these actions

Action: NDEF Discovered

Type: text/plain

If another app wanted to intercept this they would need to set a foregroundDispatch (which they should be doing when their app is open).

I actually have this coded (it's a simple intent filter in the manifest) and working. I can stick it up later today unless there are objections to this.
[Nexus S Themes and Apps] shrooms90:
@Krohnjw and 3shirts thank u guys, but i was actually looking for something lokal cause normally delivery costs are really high for shipping to switzerland. But since all the local stores have no idea what nfc is, i will have to look on the net. Thx for the pages
[Nexus S Themes and Apps] fesar:
Cant we over-ride if other need this function with the use set as default. Like if we have multiple browsers, we can set the default option to use the browser we need and then clear default if we ever need to change it back
[Nexus S Themes and Apps] krohnjw:
In theory yes. I don't have any other apps to test this out, but if there is more than one matching filter it should prompt you with the activity picker.
[Nexus S Themes and Apps] Highland3r:
Is there any way for specific actions to be treated in different ways?

If I'm understanding correctly, if your app is the "default" then ANY tag read will be processed by it - even if the contents aren't "compatible"?

At the moment can't see a problem, BUT in the future if there's multiple apps floating around there could be issues with tags not being processed correctly?
[Nexus S Themes and Apps] 3Shirts:
Can't it work like other apps (such as messaging, launchers or music) where it asks which you want to use and you choose from the available ones and if you tick the box it sets that one as default
[Nexus S Themes and Apps] krohnjw:
Yes, for that it is looking for. In theory it could get a text tag that is not what it's looking for.

I wrote the intent to be specific though. So my app would be default ONLY for NDEF tags that contain data of type text/plain (the mime type of the data). If you have other data on the NDEF tag then it's not default.
[Nexus S Themes and Apps] krohnjw:
I believe this happens because they have matching filters allowing them to be the default for that content type. This is why I made my filter as specific as possible. This way if another app wants to look for the same data you should get the activity picker.
[Nexus S Themes and Apps] 3Shirts:
Makes sense, thanks.
[Nexus S Themes and Apps] :
finally ordered some tags and just picked up your app from the market.
[Nexus S Themes and Apps] krohnjw:
1.7 up - fixed a potential FC issue when exiting from a read tag
[Nexus S Themes and Apps] fesar:
Thanks for this fix. I did send a report of this. Not sure if you recieved it
[Nexus S Themes and Apps] krohnjw:
I did. That is one of the nice things the market does for developers.
[Nexus S Themes and Apps] fesar:
Normally when i get FC's i dont send those. But somehow i am little attached to this app. Good work and effort you are putting. Thanks
[Nexus S Themes and Apps] krohnjw:
1.8 is up - this is more of a maintenance update.

I rewrote the logic for connecting to a known AP as well as configure and connect to improve it.

Connect to a known SSID now uses the SSID, not the net ID. This allows for the connection to be deleted / recreated without an issue and allows multiple users to use the same tag properly (assuming the SSID is present on both phones). If you made any tags with this the netID should still work.

You can now use Configure and connect exclusively as well - if the SSID is not configured it will configure and connect, if it is present it will pull it's net ID from your stored configurations and connect to it. The only downside is that it does take more tag space than a simple connect, but it will work for any user in all situations.

Tomorrow I'll work on adding some pending features most likely. These "holes" in the logic were bugging me though so I wanted to get them fixed :)
[Nexus S Themes and Apps] 3Shirts:
Finally got my tags (the second lot I ordered yesterday!) and so far so good. I have set one of the sticker tags to launch my Tasker 'Work' task and stuck it on the back of my phone holder in the office. Works perfectly.

I have also played around with some of the others and it all works great at the moment.
[Nexus S Themes and Apps] Highland3r:
Just been thinking about possible additional functionality for this app.... (some of this may already exist on the market, but maybe good to have it all in one place?)

Is it possible to add support for writing tags which launch a specific URL, add a contact etc? IIRC the default tag reading software handles webpage launching via NFC read URL's (not sure on the contacts though) - this maybe useful functionality to have for people wanting to generate business cards (and it's a neat "trick" to allow sharing of contact information via NFC - how cool would it be to write a tag with your details on, swipe it past someones NS and have yourself added!)
[Nexus S Themes and Apps] 3Shirts:
The standard tagging app can actually do that already (in 2.3.3 at least)
[Nexus S Themes and Apps] krohnjw:
Launching URLs exists, but it's more of a "Smart poster" tag type, it wouldn't allow for other tasks to be performed with it. This is something I am looking to add and also leverage Google's URL shortener automatically to save tag space for longer URLs.

Vcards is a bit trickier. Vcards can definitely be written (as a part of NXP Tag Writer for example) with the appropriate mime type. If you want to write *only* a Vcard this seems quite easy - although not necessarily part of what I am looking to do with this app.

If you want a Vcard to be part of a string of commands then I can look into detecting the Vcard, dynamically building the message and sending out the Intent to launch the appropriate activity (such as the Contacts app to import the data from it) or even directly importing the data from the tag itself (this wouldn't require the user to act from what I can tell) and adding the contact. Any preference on the action taken?
[Nexus S Themes and Apps] Highland3r:
What I was angling at was is there method which can be utilised by your application (to write the tags/data) which is compatible with the "stock" NS tag reader (or industry standard datatypes to allow inter-operability). So rather than writing a specific string which is readable only by your app, writing data so that it's more widely usable.

This would allow data sharing etc without people specifically needing your (excellent) app to get use out of the tags it produces. (Hell you could offer "basic" functionality to all, with your app adding extra funky stuff if you wanted to increase userbase..)

As you can tell from the above description, I'm not hugely "up" on the API's etc available for Android.... :p

@3Shirts - hadn't noticed that before - nifty... There's potential for functionality duplication BUT at least everything would be driven from one place. No doubt krohnjw can add his own stamp to the functionality too!
[Nexus S Themes and Apps] krohnjw:
Yeah - you just structure the message properly and set the mime type properly. I'd have to write in some logic to make a Vcard option clear out other selected actions, or perhaps create a different "type" of tag. The second option seems best to me - Create a landing page that allows you to create different types of tags ("Action" tag, Vcard / Contact card (new contact or any existing contact), perhaps a Smart Poster tag for launching a specific URL from your bookmarks or a custom URL (leveraging the URL shortening service google provides maybe).
[Nexus S Themes and Apps] 3Shirts:
Would you be able to have an option to hide the toast messages? I have stuck a tag on the back of my phone cradle in the office to set various things but every time I turn the screen on to check for messages etc, it rescans it so I get the 'Launched x' and 'Finished reading tag' messages.

Not vital, just kind of irritating.
[Nexus S Themes and Apps] krohnjw:
Yeah, that will be in an upcoming release. Both toast messages and debug output for when there are problems.
[Nexus S Themes and Apps] 3Shirts:
Anyone know how to turn off the tag sound that I think the built-in tag app makes
[Nexus S Themes and Apps] krohnjw:
Sure - I'll add that as an option as well in the settings. That's my app making the sound as an audible confirmation - it just is the same sound :).
[Nexus S Themes and Apps] 3Shirts:
Cool, you are a star
[Nexus S Themes and Apps] krohnjw:
Just an update for everyone.

I was in touch with the shop here when I ordered my tags from them: http://www.tagage.net/tagage-shop/

After receiving the tags I sent an email letting them know that I did receive them and described briefly what we are using NFC tags for. They were actually aware of the app here and very generously sent various tags to test to help with development.

As a result, I can confirm that the Mifare Classic, Mifare Ultralight, Mifare Ultralight C cards all format / read / write without a problem.

Currently the Mifare Topaz tags do not work - they only support Tech NfcA - so those will not format for NDEF messages using the standard API.

They also updated the country list they ship to make sure anyone who wants to pick up a small quantity of tags (min. 5) is able to (it was a bit out of date prior).

So, a big thanks to them for helping out with this and supporting further development for NFC technology.
[Nexus S Themes and Apps] wargy:
I have just ordered some wristbands ;)

Looking forward to test your application!
[Nexus S Themes and Apps] Vulpix:
Is there anyway to switch on/off 3G data connection? It's doable in CM7, so I was wondering if it can be done just for CM7.
[Nexus S Themes and Apps] krohnjw:
Toggle 2G/3G or disable mobile data entirely? The latter requires deletion/renaming of the current APN and subsequently restoring it. The former I'd have to look in to doing. It's not part of the standard API though AFAIK.
[Nexus S Themes and Apps] 3Shirts:
Just to say, Tasker can do this so would work in association with this app but obviously that depends if you want to use Tasker
[Nexus S Themes and Apps] krohnjw:
Just a FYI to everyone: 2.0 will be coming up in the next few days time permitting. It encompasses quite a few changes, so they will all be coming in at once.

Changes coming:

Changed Mime type of tags from text/plain to text/scriptlet.

This will require everyone to remake their tags (sorry) but it will prevent standard text tags from getting picked up by the parser (in case you actually want to view text tags in an app that doesn't classify itself as default).

New landing page to allow for creation of multiple tag types

Task Tag (Done - Create and read)

vCard (Done - Create - Tags app or another app reads fine)

Smart URL/URI (WIP - Create - Tags app or another app reads fine)

Text Tag (WIP - Create - Tags app or another app reads fine)

Preferences available from menu for Audible notifications, visual notifications and debug output.

Once that's released I'll go back to adding more features to the "Task" tags. First up on those is Brightness, Auto-Sync and Notification tone. Those will be minor releases as features get added.
[Nexus S Themes and Apps] fesar:
Testing

Send it to me for testing... I am impatient on waiting for 2.0
[Nexus S Themes and Apps] krohnjw:
Let me finish up the Smart Poster and Standard text tags tonight and I'll shoot you an APK to test while I do all of the preferences.
[Nexus S Themes and Apps] fesar:
Thanks a lot
[Nexus S Themes and Apps] Vulpix:
I would like to report another site that I purchased NFC cards from! It's called http://www.buysmartcard.com and sounds shady, but they are actually very professional. Shipping is reasonable for those living in Asia, and it's shipped from Hong Kong. They even sent me a performa invoice and then a paypal request. My cards came in 2 days via TNT. They accepted my small quantity of 20 cards, so I'm going to recommend them.
[Nexus S Themes and Apps] Vulpix:
Nah, I don't think toggling 2g/3g will be any fun for you. I just want to be able to disable the 3G Data without having to do the whole APN mess. How does the widgets with CM7 disable data in the first place?
[Nexus S Themes and Apps] krohnjw:
AFAIK the widgets in CM7 rename the APN and then name it back when finished (CM7 had one or 2 nightlies that were toasting data connections when this was used until they got the bug sorted).
[Nexus S Themes and Apps] Vulpix:
Oh okay, will it be hard to implement on this?
[Nexus S Themes and Apps] krohnjw:
In theory it shouldn't be difficult. I'm not too keen on messing with people's APNs though as there will inevitably be rage if something goes wrong and someone's data connection ends up broken :)
[Nexus S Themes and Apps] krohnjw:
Just an update - Look for 2.0 this weekend maybe. Saturday is out, but maybe Sunday I can finish up the rest of what I'd like to do with it for some testing.
[Nexus S Themes and Apps] fesar:
Your App is shaping up so well. Just when i was using this now with your test 2.0 It struck my mind. What i did, I created a new Home Tag which I can use to connect to my specific SSID, with specific ringtone, volume for notification, alarm and more. But if I miss one of it to it and finish the writing and close the app. And then if I want to add I wont be able to do it. So is it possible to save the profile/tag we create so we can restore it and modify it and rewrite it. Just let me know your thoughts.
[Nexus S Themes and Apps] krohnjw:
Yeah, that shouldn't be too difficult.
[Nexus S Themes and Apps] krohnjw:
Version 2.0 up (I know I said Sunday, but the kids went to bed and my wife was at work late, so I had some time to kill)

New landing page supporting multiple tag types.

Support added for writing Text, vCard and Smart URL tags (along with custom Task tag)

MIME type changed for Task tag to allow for standard Text tags to still be read by other applications while allowing Task tags to be grabbed automatically by NFC Task Launcher (new Mime type is text/scriptlet). This will require you to remake any tags you've already made - I apologize, but this is the best way to do things moving forward.

Preferences page under the menu for enabling / disabling Audio and visual notifications as well as debug output.
[Nexus S Themes and Apps] Zeem:
Love the app.. just got my tags today and my 1st car tag worked flawlessly :)

trying to created a second "home" one and every time i click on sounds in add new actions the app force closes.

not sure why, but thought i report the bug :)

thanks again for all the work you have put into this app
[Nexus S Themes and Apps] krohnjw:
If you have the market version submit a crash report with that please, otherwise grab a logcat and email it to me (krohnjw at gmail) or attach it here please.
[Nexus S Themes and Apps] Zeem:
emailed a logcat to you :) how i did it correctly
[Nexus S Themes and Apps] krohnjw:
I got it, I'll take a look this weekend. It's an odd error as it can't access your ringtones for some reason. You get this when hitting sounds our when selecting a ringtone?
[Nexus S Themes and Apps] Zeem:
cheers mate,

just figured out what it was doing.. my phone ringtone was set to silent.. if i pick an actual tone, then try the "sounds" section in the app works fine..

so it only FC's with when the the ringtone is set to silent

all working..here :)

while playing with it, i though of something not sure if it can be done..but like the way you have a toggle wifi.. a toggle task..

eg. my car mode is set when i get in the car and tap the tag, when i get out the car i would like to tap the tag again and it toggle the car setting back to default

that would be really handy if it is possible

thanks again
[Nexus S Themes and Apps] fesar:
Another thought. Can you always add another flag at the end of the tag when u write to set it as enable / disable. So we can use the same tag to toggle. Only problem is that u only need to rewrite the tag everytine u read also to update the flag. Not sure of that can be allowed by tags. Just in case if it does it would be great u can use the same to toggle to default. In such a case we need a default profile to be set by NFC task launcher.
[Nexus S Themes and Apps] krohnjw:
That's what I figured - this is fixed for the next release (the Ringtone issue).

Semantically this is where we may diverge. Currently the application can create tags that should work with *any* phone. They don't require a local profile to be set up. Anyone could use the tag to perform the prescribed actions.

I can look at possibly adding support for profiles (with an on and off state for each profile), but this would break the ability for the tag to be used with any other phone than your own.

Technically this is possible - it would allow for anyone to use a tag, but it is potentially error prone if the user moves away before the write is completed. If we're defining a default profile then it's not too much more work to extend to multiple profiles and store profile configurations in a local database.