I would like to get the context of application which has reference/hosted my library at run-time inside one class of my library project. Is it possible? If yes, how?
I would pass it as a parameter or pass it a singleton in that library.
Having the main app application extend the library's application class is a bad idea coz in java you can only extend once from a class. If your application requires to pass to another library you will be in trouble.