Custom Activity

You can write a plugin and register a UPL file to copy the java source to compile. Any hookup you need to the GameActivity can also be done in this file. Look at Gear VR or Google VR plugins for examples.