Example project demonstrating the StackOverflow answer here: https://stackoverflow.com/a/24341301/446039