Remote control widget
Questions like that are off-topic, man. However, there is already an app like it.

ONLY ONE CAN REMAIN

Ahem,
Try the Smart Remote app. Now, I know it's by Samsung (So you are choosing to install crapware) but it Has all sorts of features, including having the remote-get this!- in the notification tray. Try it out some time.

Disclaimer- An android phone may need an IR blaster, or the target device to control allow control over the internet. Like a sky+HD box.

Suprsingly useful: http://www.gottabemobile.com/2015/03/18/how-to-use-the-galaxy-note-4-as-a-remote-control/