title: Application singleton use in Android
body: <p>I have a facebook initialize sdk call and I need it to initialize the moment application is launched:</p>
  
  <p>I want to use my Application class to do that. for example:</p>
  
  <pre><code>public class App extends Application {
  
  @Override
  public void onCreate() {
      super.onCreate();
      FacebookSdk.sdkInitialize(getApplicationContext());
  }
  }
  </code></pre>
  
  <p>I have the main activity with the facebook login button:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  @BindView(R.id.login_button)
  LoginButton loginButton;
  
  private CallbackManager callbackManager;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      ButterKnife.bind(this);
  
      callbackManager = CallbackManager.Factory.create();
      loginButton.registerCallback(callbackManager, new FacebookCallback&lt;LoginResult&gt;() {
          @Override
          public void onSuccess(LoginResult loginResult) {
  
          }
  
          @Override
          public void onCancel() {
  
          }
  
          @Override
          public void onError(FacebookException error) {
  
          }
      });
  }
  }
  </code></pre>
  
  <p>How do I call my Application singleton? How do I make its onCreate() work?</p>