Override Android Application class onCreate Method

I need to initialise an Android plugin in the onCreate method of Application class in Unity project. How can I achieve this?

One possible solution could be to extend the standard UnityPlayerActivity and initialize the plugin inside the activity. UnityPlayerActivity is the standard entry point of a android application made with unity.


How to extend the activity is explained here:
Extending the UnityPlayerActivity