获取应用context
Add it in your project's build.gradle at the end of repositories:
repositories {
// ...
maven { url "https://jitpack.io" }
}
Step 2. Add the dependency in the form
dependencies {
compile 'com.github.vilyever:AndroidContextHolder:1.1.0'
}
ContextHolder.getContext(); // just call this anywhere