Skip to content

Instantly share code, notes, and snippets.

View ianmartorell's full-sized avatar

Ian Martorell ianmartorell

  • Barcelona, Spain
  • 05:14 (UTC +02:00)
View GitHub Profile
public class MySingleton {
private static MySingleton sInstance;
private final Context mContext;
private MySingleton(Context context) {
mContext = context.getApplicationContext();
}
public getInstance(Context context) {
synchronized (MySingleton.class) {