Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm using the NFC Task Launcher for launching actions stored on my own tags. This works fine.

What I'm searching for is an app that associates a certain action with an arbitrary tag. An example: my company ID card has an NFC tag. This tag cannot be changed by me. But I want to activate a "At Work" profile when I scan that tag.

So, the actual action is NOT stored on the tag but on the phone and gets triggered by reading that tag.

Is there an app that I could use for that?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

I've been looking at llama. You can set actions based on conditions, and one of the selectable conditions is NFC tag detected. I haven't tried this myself yet, but the program is pretty well thought out. Highly recommended!

share|improve this answer
    
whoa! great! must have been introduced in the short past. Aside of the NFC functionality, it seems like Llama was the app I was actually looking for! You get the accept for this! –  eckes Nov 14 '13 at 10:53

If you don't mind a small amount of simple programming, it is pretty easy to trigger actions from NFC using Microsoft's ON{X} app (yes, bizarrely this is a Microsoft app that's only available on Android).

As long as you've already got the hardware support, this lets you trigger a whole lot of actions with an NFC tag, with an absolutely minimal amount of simple scripting. See their recent blog entry on NFC for some of what you can do.

share|improve this answer
    
+1 for a really promising answer. -1 for MS because of the FB login. These guys are crazy! –  eckes Jan 10 '13 at 14:36

The answer of CAThrawn pointed me to the right direction (thanks for that!): it's possible with ON{X} and a few lines of custom code. There you go:

function messageSentCB(err){
  if(err != undefined) {
    var m = device.notifications.createMessageBox('mail sending failure');
    m.content = err;
    m.show();
  }
}

function sendMessage(){
  var _to = "<recepient>";
  device.messaging.sendMail({to:_to, subject:'arrived at work', body:':-)'}, messageSentCB);
}

device.nfc.on("found", function(signal) {
  var workid = "id-of-my-tag-at-work"; // id of my tag at work
  var id = signal.id.toArray().join("-");

  if(id == workid){
    var notification = device.notifications.createNotification("At Work");
    notification.vibrate = false;
    notification.show();

    device.network.wifiEnabled = true;          // enable WIFI
    device.bluetooth.enabled   = false;         // disable BT
    device.audio.ringerMode    = 'vibrate';     // silent mode on
    device.network.on("wifiOn", sendMessage()); // send mail once connected
  }
});

Works great for now. I'm going to dive into the ON{X} API a bit in order to toggle the state and so disable settings again once I want to leave work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.