Refactor the framework of plugin

Add reflection in plugin both on android & iOS.