onCreate in main activity

I need to create a plugin for my Solar2D project and I’m newbie on this. I want to execute a script just when the onCreate method of the main activity happen.
How can I do this from my LuaLoader.java file?