Endpoint

Projects and software by Matt Collinge @ www.mattcollinge.co.uk

QR Code Bookmarklet

leave a comment »

QR Codes are a useful way of getting data to your mobile phone using it’s built-in camera. They’re basically 2D barcodes that can carry things like URLs and contact details. On Android I’d recommend using the app called Barcode Scanner to read QR Codes.

There were instances where I wanted to open up a webpage with a long URL on my phone & didn’t want to go through the hassle of copying and pasting it into one of those online QR Code generators.

This bookmarklet for Firefox and newer versions of IE lets you create a QR Code for the page you’re on.. it’ll default to the current page, but you can also override this with something else (like a URL from your clipboard, or whatever).

Add a new bookmark to your toolbar, and set the URL to the code below (I’d have put the proper link on here but WordPress disables the Javascript);

javascript:var%20sCode=prompt('Enter%20URL%20to%20encode',window.location);void(window.open('http://chart.apis.google.com/chart?cht=qr&chs=300x300&chl='+encodeURIComponent(sCode),'Qr%20code','top=100,left=200,width=350,height=350,status=yes'));

Written by Matt

January 29, 2010 at 7:44 am

3view Q&A – Freeview HD

leave a comment »

This year Freeview goes HD.. but as yet there isn’t any hardware available to consumers. I’ve been keeping my eye on 2 boxes, the Humax DVB-T2 HD and one by a new British company called 3view.

3view has peeked my interest because of some of the more innovative features they’re including, like the support for VOD, apps (e.g. Facebook), and web-browser that allows you to view sites like Channel 4’s 4oD.

There’s a feature list on their site, but I also emailed them to clarify a few things. What I asked may be of interest to others, so here’s what they said;


Q: Now that the BBC intends to restrict the EPG data, is that something that won’t be available on the 3view box?

A: We are currently in discussions with BBC about this. There shouldn’t be any problems and the EPG data will be available on the 3view box.


Q: Is the box able to play back DivX/Xvid?

A: DivX5 or higher – no problem but the older version codec hasn’t been tested. We have tested Xvid and that’s fine too.


Q: With the H264 support, I’m assuming these can be in an MKV container? Will it play back 1080p video without a problem? And how about support for pass-through on DTS soundtracks? Oh, and embedded subtitles?

A: There won’t be any problems with playing back 1080p videos. Embedded subtitles tracks will not work in the current version, once recorded. We may add that in the future.


Q: Is there any way for users to customise the software on the box? I love the Topfield TF5800 because you can add user-written apps to plug gaps in functionality and generally make the box so much better.

A: Not yet- once we have a solid code base we may allow some customer tinkering – but not from launch, as bug tracking will become too complex for a V1.0.


Q: Is the remote control IR, or Wireless?

A: It is IR – BUT we have zwave installed and may offer zwave remotes in the future for extra web interoperability


Q: Are you able to record 2 programs, and watch 1 other (as long as it’s on the same multiplex as one of the recorded programs)?

A: Not at the moment – it’s record one and watch one. We will be adding that in a future upgrade.


Q: Do you think the box will be firmware upgradable to include support for the BBC’s Canvas project when that starts to get finalised & implemented?

A: We anticipate a YES but we cannot be sure as it is not a reality yet.

Written by Matt

January 26, 2010 at 7:50 am

Android Apps – Pick of the best stuff – Jan 2010

leave a comment »

Here’s my pick from the thousands of Android apps that are available as of Jan 2010.. all of these are free!

Media

  • Listen – Google’s podcast subscription & listening app
  • beebPlayer – Stream content from the BBC’s iPlayer
  • Rev3Remote – Stream video content from Revision3

Screen Candy

  • chompSMS – View SMS conversations like the iPhone
  • SMS Popup – Nice pop-up notification of SMS messages
  • Endless Walls Wallpapers Lite – Wallpapers
  • Backgrounds – Wallpapers
  • Retro Clock Widget – Nice clock + date widget
  • The Weather Channel – has a nice widget

Developer / Techie / Advanced stuff

  • Quick Settings – Quick access to settings, e.g. turn off wifi
  • ASTRO File Manager – Access files on your SD card
  • AppsInstaller – Install apps from your SD card
  • Free Advanced Task Manager – Task management & app uninstaller
  • Wifi Analyser – Wifi graphing (like Netstumbler)
  • GPS Status – Detailed GPS info
  • android-vnc-viewer – VNC Viewer

Barcodes / Shopping

  • ShopSavvy – Read barcodes and it’ll find the product online
  • Barcode Scanner – Recommended for reading (and creating) QR Codes

Augmented Reality

  • Google Sky Map
  • Reality Browser 3.0

Misc Useful Stuff

  • RealCalc Scientific Calculator
  • Voice Recorder
  • Text Edit
  • Compass
  • DrawNoteK – Draw notes on the screen
  • Bubble – Spirit level

App Versions of Websites

  • Quickpedia – Mobile optimised Wikipedia
  • Seesmic – Twitter client
  • Facebook for Android – Official Facebook app
  • Bloo – Unofficial Facebook app that includes notifications

Games

  • Labyrinth Lite
  • Phit Droid
  • Frozen Bubble
  • Coloroid
  • Bebbled

Written by Matt

January 18, 2010 at 6:55 am

Posted in Android, Internet, Software, Technical

Tagged with , ,

iPhone and Android development with Titanium

leave a comment »

Over the past few months I’ve worked on a couple of mobile applications for the iPhone and Android platforms. I’d looked at Phonegap some time before that, but determined that it wasn’t up to the job, but more recently I stumbled across Titanium from Appcelerator. The idea is that you code up your apps using HTML and Javascript. The Javascript calls the Titanium API to create things like lists, dialog boxes, and phone features such as geolocation.

Some of the advantages of using Titanium are:

- No need to learn Objective-C (iPhone) or Java (Android)
- Leverage existing HTML + Javascript skills
- Write one version of the code that can be deployed to both platforms
- Code is compiled up into native applications which are accepted in the App Store
- Potential to deploy to other platforms in the future (e.g. Blackberry, Symbian)

The level of support provided by the Appcelerator staff on the official forums is brilliant, and the tutorial videos are good for those who want to get an overview of creating apps without wading through documentation.

You’ll still need a Mac if you want to develop for the iPhone, because Titanium makes use of the iPhone SDK. But if you just want to do Android development then you can use Window or Linux as well.

Although you’ll be developing 1 set of code for both the iPhone and Android, you’ll probably want to customise the UI slightly differently for each platform. For example, Android apps often hide away items such as ‘Settings’ and ‘Help’ under the Menu button. It’s simple to code this kind of thing up:

	if (Titanium.Platform.name == 'android') {
		var menu = Titanium.UI.createMenu();
		menu.addItem("Help/About", function() {
			displayWindow('Help / About', 'window_about.html');
		}, Titanium.UI.Android.SystemIcon.HELP);
		Titanium.UI.setMenu(menu);
	} else {
		data.push({title:'Help / About',image:'tabicon_help.png', color:'#ffffff'});
	}

That code will create the Help/About option under a menu on Android, and add it to the home screen’s list on the iPhone. Simple.

Titanium is an awesome framework so if you’re considering developing for the iPhone and/or Android then I’d highly recommend you take a look.

Written by Matt

January 13, 2010 at 7:10 am

Flat Cat 6

with 2 comments

128381306-40 This year I’m moving to HD at home, but streaming HD over a wireless connection is far from ideal. The next step up from that is to use the Ethernet over power adapters (like Homeplug) which are supposed to be pretty decent, yet expensive. However, I’ve gone for a wired connection using some really flat Cat 6 gigabit Ethernet cable.

Usually it’s a really hassle running cable from your router to the device, but because this cable is so flat it’ll go easily under most doors and you can then run it under the carpet.

At about £14 from CPC (for 15 meters) it’s not a bad price compared to buying wireless or power adapter kits.

Written by Matt

May 31, 2009 at 1:34 pm

Freeview to DVD with the Topfield TF5800

leave a comment »

After owning the Topfield TF5800 freeview PVR for about 15 months I’m still bowled over by the functionality it offers. The latest features I’ve just found useful are to move series linked programs into a specific folder, plus a setting that allows you to only keep the last X number of episodes.. deleting the oldest.

Another feature I never thought I’d use was the ability to copy off the recorded files to a PC. It’s allowed me to take some episodes and (with the help of a script) burn them off onto a DVD.

At first I thought the process for putting the .rec files onto DVD was going to be a case of using Super(c) to convert them into something that DVDFlick could deal with. However, there’s a fantastic script called rec2dvd which deals with multiple files & requires no transcoding (so therefore doesn’t take long to create the DVD).

Before I let rec2dvd do it’s magic, I used MPEG Streamclip to clip any unwanted video from the file. Perfect!

Written by Matt

May 26, 2009 at 7:04 am

Posted in PVR, Technical, freeview

Tagged with , ,

Power Meter Plus 1.6 Released

with 2 comments

This release of Power Meter Plus – the popular replacement for the standard Windows power meter – adds 4 new features/settings. These have been added after feedback from users.. a lot after it was featured on Lifehacker.com and in PC Pro magazine :)

The features/settings now available are:

  • Hide the meter instead of switching sides.. it then fades back a few moments later
  • Change the transparency level of the message that appears across the screen for certain warnings
  • Flash the warning message (optional)
  • Start the meter on the right of the screen (which is where it will stay if you set it not to move sides)

Click here for the Power Meter Plus download page.

Power Meter Plus

Written by Matt

February 9, 2009 at 8:17 pm

Using 3rd Party batteries with the Canon HF100/HF10 Camcorder

leave a comment »

3775 The Canon HF100 is a great HD camcorder, and I’d really recommend it, especially for the price. You probably want a spare battery to go with it, but be careful which battery you choose. In their “wisdom” Canon has put a stranglehold on the 3rd party battery market by making the camcorder *very* picky about the voltage tolerances when charging a battery that’s attached to the camcorder.

The one I tried from this company would power the camcorder, but just refused to be charged. The camcorder LED blinked quickly, indicating there was a problem with the battery.

Watch out for sites like B2C Shopping; in their terms and conditions they’ve got clause which says they won’t pay your return postage costs… even if the reason for your return isn’t your fault! Their product description categorically says the battery is 100% compatible with the HF10/HF100.. but it isn’t! They eventually refunded the item cost, but none of the postage costs I incurred sending the incompatible product back!

I’ve seen on eBay that any non-Canon batteries for the HF10/HF100 come with their own charger.. getting around the problem of the camcorder refusing to charge these 3rd party batteries. Even when you do buy one of these, the batteries aren’t “intelligent” like the official Canon batteries.. which means each time you switch it on, the camcorder will tell you it can’t communicate with the battery & is that okay. Very annoying.

Written by Matt

February 8, 2009 at 11:30 am

Binatone IR804 Price Increase at Argos

leave a comment »

dab For a few weeks I’d had my eye on the Binatone IR804 DAB, FM, and Internet Radio. It was listed at £60 which seemed like a good deal for something that was of reasonable quality. Okay, the sound isn’t going to be earth-shattering, but functionality-wise £60 seemed about right.

However, I saw today that Argos have their new prices out and it’s shot up by £28 to an outrageous £87.99! All the adverts on TV tell us how they bring down their prices, but they don’t tell you about all the prices they’ve increased!

Written by Matt

February 8, 2009 at 11:18 am

Posted in Technical

Tagged with , , , , ,

Power Meter Plus in PC Pro Magazine

leave a comment »

pc-pro-logo Power Meter Plus has been getting a lot of coverage this month; it’s been mentioned on dozens of blogs and now in PC Pro magazine issue 172, in fact I think Lifehacker might have picked up on it from there & the blogs picked up on Lifehacker’s article.

pcpro-jan-2009

Written by Matt

January 5, 2009 at 7:30 am

Power Meter Plus featured on Lifehacker

leave a comment »

Lifehacker is one of my daily visits, so it was brilliant to see that it had Power Meter Plus as the Featured Windows Download :-D

Written by Matt

December 31, 2008 at 3:49 pm

Creating a Netvibes / iGoogle Gadget for Multi-Image Display

leave a comment »

To help make it as easy as possible for family members to see new pictures from the Collinge household I decided to set them up with Netvibes homepages, each containing a widget to display the latest photos from Picasa Web Albums. Picasa Web Albums provide an RSS feed that you can subscribe to which is a good start.. but I couldn’t find a way to display them just as I wanted.

The spec is to display the latest images, over as many columns as the user specifies.. and have the images resize to fit the width of the widget. They pretty much get displayed in a grid style layout.

Step 1) Get the URL for Picasa Web Albums (or whatever service you’re using) and make sure it works. The first gotcha here was that Picasa Web Albums has a limitation which means that images > 800px will not be embedded. They’ll result in a 404 File Not Found. To get around this, append ?imgmax=800 to the RSS’s URL.

Step 2) The feed for Picasa Web Albums is sorted in ascending date order.. I wanted it in descending date order so that the latest photos show first. To do this I chose to re-format the feed using Yahoo Pipes.. it’s a way of tinkering with a feed an invaluable for times when you need to do something simple like this.

Picasa gives you an Atom-based feed which seems to be causing a few issues with my code.. it basically makes the images go into a different node from the one I expected.. and I’ve been unable to work out exactly where it’s putting them. The best way around this is to simply run the RSS feed through a simple Yahoo Pipe; I’ve published one which sorts the images in date descending order. Use that and copy the RSS feed it generates.

Step 3) Create a new widget using UWA so that it works with Netvibes and iGoogle. This is relatively simple.. just requiring a bit of coding to make it happen. As usual I’ve tried to make the code as generic as possible & driven by user preferences. The user can specify which node in the JSON object (returned from the RSS feed) contains the image to display.. useful when dealing with non-standard image enclosures. It will default to the first enclosure at item.enclosures[0].url

The finished widget is published here.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:widget="http://www.netvibes.com/ns/"  >
	<head>
		<title>Multi-Image Display</title>

		<meta name="author" content="Matt Collinge" />
		<meta name="email" content="do-not-email@mt2009.com" />
		<meta name="description" content="Display multiple images from an RSS feed. Useful for feeds like those from Picasa Web Albums" />
		<meta name="version" content="1.0" />
		<meta name="website" content="http://eco.netvibes.com/widgets/298784/multi-image-display" />

		<meta name="keywords" content="image, rss, picasa, web album, picture, multiple, display, grid" />
		<meta name="autoRefresh" content="15" />
		<meta name="apiVersion" content="1.2" />

		<link rel="stylesheet" type="text/css" href="http://www.netvibes.com/themes/uwa/style.css" />
		<script type="text/javascript" src="http://www.netvibes.com/js/UWA/load.js.php?env=Standalone"></script>

		<style type="text/css">
			.imageDisplay {
				margin:0;
				padding:0;
			}
		</style>

		<widget:preferences>
			<preference name="title" type="text" label="Title" defaultValue="Multi-Image Display" />

			<preference name="url" type="text" label="RSS Feed" defaultValue="" />
			<preference name="limit" type="range" label="Number of images to display" defaultValue="10" step="1" min="1" max="50" />
			<preference name="columns" type="range" label="Number of columns to use" defaultValue="2" step="1" min="1" max="8" />
			<preference name="imagenode" type="text" label="Node in RSS Feed Containing Image" defaultValue="item.enclosures[0].url" />
		</widget:preferences>

		<script>
			var BasicRSSReader = {};

			BasicRSSReader.feed = false;

			widget.onLoad = function() {
				if (widget.getValue('url') === '' || widget.getValue('url') == undefined) {
					widget.setBody('Please edit the preferences and enter the URL of the RSS feed where you want to take images from.<br><br>. Use a feed re-formatter like Yahoo Pipes if you need to tinker with a 3rd party RSS feed.');
				} else {
					widget.body.addClassName('imageDisplay');
					widget.setTitle(widget.getValue('title'));
					UWA.Data.getFeed(widget.getValue('url'), BasicRSSReader.display);
				}
			}

			BasicRSSReader.display = function(feed) {
				var bodyHTML = '';
				if (feed) BasicRSSReader.feed = feed;

				var imageWidth = widget.body.getDimensions().width / widget.getValue('columns');
				var imageCount = 0;
				var columnCount = 0;

				bodyHTML += '<table border=0 cellpadding=0 cellspacing=0>';
				for(var i=0; i < BasicRSSReader.feed.items.length; i++) {
					var item = BasicRSSReader.feed.items[i];

					if (imageCount >= widget.getValue('limit')) {
						bodyHTML += '</tr>';
						break;
					}

					if (columnCount == 0) {
						bodyHTML += '<tr>';
					}
					bodyHTML += '<td><a href="' + item.link + '"><img src="' + eval(widget.getValue('imagenode')) + '" width="' + imageWidth + '" /></a></td>';

					columnCount++;

					if (columnCount == widget.getValue('columns')) {
						columnCount = 0;
						bodyHTML += '</tr>';
					}

					imageCount++;
				}
				bodyHTML += '</table>';

				if (imageCount==0) bodyHTML = 'Unable to load feed.';
				widget.setBody(bodyHTML);
			}
		</script>			

	</head>
	<body>
		<p>Loading...</p>

	</body>
</html>

Written by Matt

December 31, 2008 at 11:15 am

Power Meter Plus 1.5 Released

leave a comment »

This release of Power Meter Plus – the popular replacement for the standard Windows power meter – fixes a bug with widescreen monitors.

Click here for the Power Meter Plus download page.

Power Meter Plus

Written by Matt

December 27, 2008 at 9:59 am

Netvibes UWA

leave a comment »

Netvibes is a pretty awesome personal homepage web app. It’s very similar to iGoogle, but IMO it’s a lot more stable & a lot better looking. Netvibes offer a unified API that allows you to write using their API and deploy your gadget to multiple providers, such as iGoogle, Opera, iPhone, MacOSX and Vista.

I’ve been writing a gadget for my company but decided I also wanted one to take the first image out of an RSS feed and present so that it takes up all the space in the gadget. Useful for things like LOLcats. It was surprisingly simple to create.. so with some UWA coding, and a simple pipe at Yahoo Pipes, I’m now able to bring in the first image from a specified RSS feed.. assuming the image’s URL has been put into the item.content tag.

Here’s the finished gadget.. and the source code is below…

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:widget="http://www.netvibes.com/ns/"  >
	<head>
		<title>Single Image Display</title>

		<meta name="author" content="Matt Collinge" />
		<meta name="author_email" content="gadget@mattcollinge.co.uk" />
		<meta name="description" content="Display an image from the content section of the first item in an RSS feed. Useful for feeds like those from LOLCats. Use Yahoo Pipes to get the image URL (only) into the item.content tag." />
		<meta name="version" content="1.1" />
		<meta name="website" content="http://www.mattcollinge.co.uk/" />
		<meta name="keywords" content="image, rss, lolcats, single, full width" />
		<meta name="autoRefresh" content="15" />

		<link rel="stylesheet" type="text/css" href="http://www.netvibes.com/themes/uwa/style.css" />
		<script type="text/javascript" src="http://www.netvibes.com/js/UWA/load.js.php?env=Standalone"></script>

		<style type="text/css">
			.imageDisplay {
				margin:0;
				padding:0;
			}
		</style>

		<widget:preferences>
			<preference name="title" type="text" label="Title" defaultValue="Single Image Display" />
			<preference name="url" type="text" label="URL" defaultValue="" />
		</widget:preferences>

		<script>
			var BasicRSSReader = {};

			BasicRSSReader.feed = false;

			widget.onLoad = function() {
				if (widget.getValue('url') === '' || widget.getValue('url') == undefined) {
					widget.setBody('Please edit the preferences and enter the URL of the RSS feed where you want to take the image from.<br><br>The image URL must be in the item.content tag otherwise this will not work. Use feed a reformatter like Yahoo Pipes if you need to tinker with a 3rd party RSS feed such as LOLcats.');
				} else {
					widget.body.addClassName('imageDisplay');
					widget.setTitle(widget.getValue('title'));
					UWA.Data.getFeed(widget.getValue('url'), BasicRSSReader.display);
				}
			}

			BasicRSSReader.display = function(feed) {
				var feedList = 'Unable to load feed.';
				if (feed) BasicRSSReader.feed = feed;
				var item = BasicRSSReader.feed.items[0];
				feedList = '<img src="' + item.content + '" width="' + widget.body.getDimensions().width + '" />';
				widget.setBody(feedList);
			}
		</script>			

	</head>
	<body>
		<p>Loading...</p>
	</body>
</html>

Written by Matt

December 23, 2008 at 3:30 pm

Using JSLint with Notepad++

leave a comment »

I’m doing a fair amount of development using the ExtJS framework. IE is a bit picky about getting JavaScript properly formatted (otherwise it refuses to render the page). That’s why I’ve found JSLint really useful for locating stray commas or semi-colons.

To make it a bit quicker to put the file contents in the JSLint box I decided to hook it up to the Run menu in Notepad++. However, the JSLint web page doesn’t allow us to pass in data to it. To get around this you can copy the HTML + JS files from the authors website an copy them locally. Once you’ve got them locally you can modify the source to allow the passing of data.. here’s the change I made to do it on my system:

jslint.php changes.. add this right near the end

<script src="javascript.js"></script>

You’ll then need a way to take the file contents and fire it off to the page. At first I tried passing the file contents via the GET request, but it’s limited in length. Also, Notepad++ won’t let you send the file contents via the Run command. In the end I chose to use a piece of VBScript to bring up the webpage in the default browser, and some JavaScript to read in the file & place it into the page.

launchJSLint.vbs

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(wscript.Arguments(0), 1)

Dim strCharacters

Do Until objFile.AtEndOfStream
    strCharacters = strCharacters + objFile.Read(1)
Loop

strCharacters = Escape(strCharacters)

Set objFileSystem = CreateObject("Scripting.fileSystemObject")
Set objOutputFile = objFileSystem.CreateTextFile("c:\progra~1\notepad++\jslint\javascript.js", TRUE)
objOutputFile.WriteLine("document.getElementById(""input"").value = unescape(""" & strCharacters & """);")

Dim wShell
Set wShell = CreateObject("WScript.Shell")
wShell.Run "c:\progra~1\notepad++\jslint\jslint.html", 9

Finally, this is the Run command you can use in Notepad++ to launch the script…

wscript "C:\Program Files\Notepad++\launchJSLint.vbs" "$(FULL_CURRENT_PATH)"

Written by Matt

November 20, 2008 at 8:04 am