Back to project page whoisit-android.
The source code is released under:
MIT License
If you think the Android project whoisit-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.mitchbarry.android.whoisit; /*from w w w .j a va2s . c om*/ import static android.os.Build.VERSION.SDK_INT; import static android.os.Build.VERSION_CODES.FROYO; import android.app.Application; import android.app.Instrumentation; import android.content.Context; import com.github.kevinsawicki.http.HttpRequest; /** * Who Is It application */ public class WhoIsItApplication extends Application { private static WhoIsItApplication instance; /** * Create main application */ public WhoIsItApplication() { // Disable http.keepAlive on Froyo and below if (SDK_INT <= FROYO) HttpRequest.keepAlive(false); } /** * Create main application * * @param context */ public WhoIsItApplication(final Context context) { this(); attachBaseContext(context); } @Override public void onCreate() { super.onCreate(); instance = this; // Perform injection Injector.init(getRootModule(), this); } private Object getRootModule() { return new RootModule(); } /** * Create main application * * @param instrumentation */ public WhoIsItApplication(final Instrumentation instrumentation) { this(); attachBaseContext(instrumentation.getTargetContext()); } public static WhoIsItApplication getInstance() { return instance; } }