Skip to content

Instantly share code, notes, and snippets.

@mbahgojol
Created April 8, 2017 09:29
Show Gist options
  • Save mbahgojol/99772d33b1b6b1a25d1aee807452e813 to your computer and use it in GitHub Desktop.
Save mbahgojol/99772d33b1b6b1a25d1aee807452e813 to your computer and use it in GitHub Desktop.
class application
public class App extends Application{
private static Context context;
@Override
public void onCreate() {
super.onCreate();
context = getApplicationContext();
}
public static synchronized Context getContext() {
return context;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment