Last active
December 20, 2015 05:29
-
-
Save robUx4/6078383 to your computer and use it in GitHub Desktop.
static Context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Touiteur extends Application { | |
private static Touiteur mApp; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
if (null != mApp) throw new NullPointerException("The application is launched twice ?! this:"+this+"/"+mApp); | |
mApp = this; | |
} | |
public static Touiteur getInstance() { | |
return mApp; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment