How to Automate Your Sleep Time Tasks Using NFC on Your Android Phone

Khamosh Pathak

I’m sure you have a night time routine. It’s either catching up on news before going to bed or reading a book. But when we do hit the sack, some of us put the phone on silent mode, switch off Wi-Fi/radios to save battery or listen to some nature sounds, to help us relax after a stressful day.

Automate Your Bed Time Tasks Using NFC
Automating via NFC can be fun! | Flickr.

Now, it’s perfectly fine to do all of this manually. It takes a couple of taps and maybe a minute to get through. But what if all of that happened when you tapped your phone against an NFC tag/sticker that’s on your bedside table? I mean, the last thing you want to do before going to bed is fiddle around with a bunch of menus right?

Right. So if you have an NFC-compatible phone, all you need to do is buy some cheap NFC tags/stickers and meet me after the break.

Trigger

Trigger is a completely free, albeit a bit complicated app we’ll be using to set up the automation process.

As the name of the app says, you can trigger some tasks when certain criteria is met. You can use it to set up complex automation recipes where Y is initiated when X happens. But today, we’re going to keep things simple.

Trigger has two basic sets of options – Task and Switch. Tasks is the simple one. When you tap the NFC tag, the defined action will be initiated. So say you want to turn off Wi-Fi. If the Wi-Fi is on, it will be turned off. If it’s already off, no issues.

Switch is where things get a bit more complicated. This is where toggles come into play. If it’s on, turn it off. If it’s off, turn it on. That kind of stuff. My experience with Switches has not been reliable and I suggest you stay way from the option, at least for this particular use case.

Ideas for NFC uses: You can do loads of stuff with NFC tags and a lot of it is possible using just the Trigger app. If you’re looking for some ideas, check out our article and get inspired.

Setting Up Trigger

As I’ve said above, you can have multiple tasks in one action. In this example, we’ll accomplish the following tasks.

  • Turn off Wi-Fi (mobile data/GPS changes require root access).
  • Put the phone in silent mode.
  • Play a song.
  • Set an alarm for 8:00 AM.

Step 1: Open the app and tap the + button in the top-right corner. Again, from the Triggers section, tap the + button.

Trigger

Step 2: From this menu, select NFC and tap Next. Here you can add restrictions. Skip this for now by tapping Done. Now, tap Next.

Trigger

Step 3: In the Task panel, tap +. Now, this the place you’ll need to pay attention. From the categories listed here, select the relevant actions.

Step 4: From Wireless & Networks, select Wi-Fi On/Off (or any other option). From Sounds and Volume, select Sound Profile or Notification Volume.

If you want to play a song before you fall asleep, select Start/stop media playback. From Alarms, tap Set Alarm.

Trigger

If you want to start a nature sounds or sleep tracking app, tap Applications & Shortcuts and select Open Application.

Choose all the actions you want. The next step will be customizing each of the actions you selected.

Step 5: Now you’ll see the Configure Actions menu. Each of the actions you selected will have some option. For instance, from Wi-Fi On/Off, select Disabled. In Sound Profile, select Silent and choose the application for the app picker.

Trigger

Now tap Add to Task, then Next, skip the Switch section and hold your NFC tag against the phone to write the task to it.

Trigger

That’s it you’re done. So the next time you hit the sack, just tap your Android phone to these pre-programmed NFC tags. By default, Trigger doesn’t have the tag rewrite functionality. But you can get a free plugin from Play Store to enable the feature.

What Do You Use NFC For?

Have you come up with any creative ways to use the NFC chip? Share with us in the comments below.

Also See
#Android apps#automation

Join the newsletter