i have tested a few in a hunt for an app that can control my decoder, and i havent found any yet.
but for my tv i use ZaZa Remote, i would apreciate any recommadations myself.
but AFAIK the s4 in itself isnt able to learn IR codes, but i think you can buy an ir dongle for some of the apps which are capable of learning commands.
Phone: Samsung Galaxy S4 i9505
Rom: Stock, Rooted Android 4.3.
Tablet: Galaxy Tab 2 10.1 p5110
ROM: OC Cyanogenmod 10,2.
Phone: Samsung Galaxy S
Phone: Samsung Galaxy SII
To the Galaxy and beyond......