Skip to content

Instantly share code, notes, and snippets.

@nisrulz
Last active September 17, 2017 22:08
Show Gist options
  • Save nisrulz/18790c977886236404b0f5ddae68910e to your computer and use it in GitHub Desktop.
Save nisrulz/18790c977886236404b0f5ddae68910e to your computer and use it in GitHub Desktop.
Making your Android Library, Lifecycle-Aware blog post code snippet: AwesomeLibMain class
public class AwesomeLibMain {
static final AwesomeLibMain ourInstance = new AwesomeLibMain();
public static AwesomeLibMain getInstance() {
return ourInstance;
}
private AwesomeLibMain() {
}
public void init() {
System.out.println("Called From AwesomeLibMain Class, init()");
}
public void cleanup() {
System.out.println("Called From AwesomeLibMain Class, cleanup()");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment