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?
According to this post you can let the library auto-initialize itself with the application context by the aid of a ContentProvider.
Be careful anyway, as described in the post comments, there may be drawbacks concerning loading time and instant run, as well as crashes on multi-process apps.