AndroidContextHolder icon indicating copy to clipboard operation
AndroidContextHolder copied to clipboard

任意位置下获取应用context

AndroidContextHolder

获取应用context

Import

JitPack

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'
}

Usage

ContextHolder.getContext(); // just call this anywhere

License

Apache License Version 2.0