Engadget
How to use your phone as a remote for any smart TV

Smart phones can replace a TV remote by using built-in infrared blasters on some Android models. They can also run the TV’s official companion app, such as Google TV, Roku, or Fire TV, which connects via Wi-Fi and Bluetooth. These apps provide a D-pad, volume control, and on-screen QWERTY input for searching and playback. Third-party universal remote apps, like the Apple TV Remote Control app on Android, offer alternative interfaces and Wi-Fi or IR connectivity when the manufacturer’s app is unavailable.