That tutorial seems outdated for 2011 and below TV models. Try to visit this link, the reply has attached PIG sample apps and i think easier to learn from what already done.
http://samsungdforum.com/SamsungDForum/ForumView/7e2b7fa90012098b?forumID=6edcb9318bf4438f
The newer SDK should be able to use sf.service.PIG object to do the work