{"id":448,"date":"2013-09-19T12:24:00","date_gmt":"2013-09-19T12:24:00","guid":{"rendered":"http:\/\/www.jontrinder.com\/blog\/?p=448"},"modified":"2013-09-19T12:24:00","modified_gmt":"2013-09-19T12:24:00","slug":"nfc-and-android","status":"publish","type":"post","link":"https:\/\/www.jontrinder.com\/blog\/?p=448","title":{"rendered":"NFC and Android"},"content":{"rendered":"<p>With NFC tags being so cheap, been having a play.<\/p>\n<p>This is a reminder of what needs to be on an NFC \u00a0tag to make \u00a0Connectbot \u00a0open an ssh connection to a server.<\/p>\n<p>It mainly comes down to remembering that you launch applictions in android via intents.<\/p>\n<p>Examples of intents connectbot (an ssh client) understands are shown <a href=\"http:\/\/stackoverflow.com\/questions\/11162086\/how-to-start-connectbot-from-my-own-activity-via-intent\">here<\/a><\/p>\n<p>In short it looks like this:-<\/p>\n<pre><code>&lt;intent-filter&gt;\r\n  &lt;action android:name=\"android.intent.action.VIEW\" \/&gt;\r\n  &lt;category android:name=\"android.intent.category.DEFAULT\" \/&gt;\r\n  &lt;category android:name=\"android.intent.category.BROWSABLE\" \/&gt;\r\n  &lt;data android:scheme=\"ssh\" \/&gt;\r\n  &lt;data android:scheme=\"telnet\" \/&gt;\r\n  &lt;data android:scheme=\"local\" \/&gt;\r\n  &lt;!-- format:  ssh:\/\/user@host:port\/#nickname  --&gt;\r\n  &lt;!-- format:  telnet:\/\/host:port\/#nickname  --&gt;\r\n  &lt;!-- format:  local:\/\/  --&gt;\r\n&lt;\/intent-filter&gt;<\/code><\/pre>\n<p>ssh:\/\/username@server.somedomain.com:portnumber\/#nickname<\/p>\n<p>Then use something like <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.jwsoft.nfcactionlauncher&amp;hl=en_GB\">NFC task launcher<\/a> to attach and open URL action to your tag.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With NFC tags being so cheap, been having a play. This is a reminder of what needs to be on an NFC \u00a0tag to make \u00a0Connectbot \u00a0open an ssh connection to a server. It mainly comes down to remembering that &hellip; <a href=\"https:\/\/www.jontrinder.com\/blog\/?p=448\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[45,80],"tags":[87,67,66],"class_list":["post-448","post","type-post","status-publish","format-standard","hentry","category-android","category-computing","tag-android","tag-connectbot","tag-nfc"],"_links":{"self":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/448","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=448"}],"version-history":[{"count":2,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/448\/revisions"}],"predecessor-version":[{"id":450,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/448\/revisions\/450"}],"wp:attachment":[{"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jontrinder.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}