Both the Samsung Galaxy S4 and HTC One have an IR Blaster. If the included software is not powerful and feature packed enough there is now an app that covers all your remotes, called Smart IR for HTC One or Smart IR for Samsung S4.
With Smart InfraRed Remote for your HTC One or S4, you can add, create and customize any number of remotes, combining controls from any of your existing remotes. Imagine a single remote on which the CHANNEL UP button controls your Set Top Box from your TV provider, the VOLUME keys control your home theater system and the arrow keys control your TV’s menu. If your mobile rings the remote mutes your TV etc. If the app detects a sudden increase in volume, like big explosions it can automatically lowest the volume. This is the first app available making use of the IR Blaster and consequently costs more than most apps at £6.42.
Smart Remote can control your TV, Set Top Box, Lights, Projectors, etc.. Virtually anything that has an Infrared Receiver can be controlled by Smart Remote with the correct remote codes. DSLR camera support apparently is in the pipeline.
There is one difference between the S4 and HTC One, the S4 due to a hardware limitation is not able to do automatic learning of codes.