Or you could just have the app use the irda when it is told to, such as giving it a send and receive command. That way, it won't be killing your battery the second you start it.
If there are any open-source programs that use irda, you should check into those. Look around, there must be something of use.