The only piece of software that can reliably do the job is Samsung's S Cast.
Failing that, use an MHL cable.
Failing that, use Chromecast. This last one doesn't work all the time but it usually works.
If you're a developer, connect your TV to your computer and use Droid-Screen.
There are also numerous cloud service that can stream your Android screen through the internet. These are bandwidth dependent but when you have the bandwidth they work very well.