NFC and Android

With NFC tags being so cheap, been having a play.

This is a reminder of what needs to be on an NFC  tag to make  Connectbot  open an ssh connection to a server.

It mainly comes down to remembering that you launch applictions in android via intents.

Examples of intents connectbot (an ssh client) understands are shown here

In short it looks like this:-

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <data android:scheme="ssh" />
  <data android:scheme="telnet" />
  <data android:scheme="local" />
  <!-- format:  ssh://user@host:port/#nickname  -->
  <!-- format:  telnet://host:port/#nickname  -->
  <!-- format:  local://  -->
</intent-filter>

ssh://username@server.somedomain.com:portnumber/#nickname

Then use something like NFC task launcher to attach and open URL action to your tag.

This entry was posted in android, computing and tagged , , . Bookmark the permalink.

Comments are closed.