This app was mentioned in 3 comments, with an average of 1.33 upvotes
I bough the paid version of AIR remote, they have a free version but it works well to control my roommate's apple tv. https://play.google.com/store/apps/details?id=com.splashythings.macremote&hl=en
Worth a shot trying to reprogram it, although failing that this app looks pretty promising, it claims to use the default IR codes so minimal hassle although the G4 isn't on their supported devices yet it's worth trying as the G3 is so it could possibly work.