how to create a plugin that writes a new activity in Manifes.xml

thanks for replying on this.
i have seen this How to Edit android manifest was build - #4 by wodin link before.

the thing is i have spent many day on this. all the solutions lead me to modify properties of existing activities and couldn’t figure out a way to write a new activity tag with its own properties on prebuild.

i already know how to place them on manifest on app eject, but really want to keep things wrapped in managed workflow.

i would really appreciate anyone’s help on this.