title: Activity and service both gets different value of Application instance
body: <p>Hi I have created one static variable in Application Class.
  I am also accessing only Singleton class.
  but I am getting different value of that variable in <code>Activity</code> and <code>Service</code>.</p>
  
  <p>Code.
  MyApplication Class</p>
  
  <pre><code>public class MyApplication extends Application {
  public static int activeRouteId;
  private static MyApplication mInstance;
      @Override
      public void onCreate() {
          // TODO Auto-generated method stub
          super.onCreate();
          //ACRA.init(this);
          mInstance=this;
  
          activeRouteId=PreferenceHelper.getActiveRouteId(mInstance);
  
      }
      public static synchronized MyApplication getInstance() {
          return mInstance;
      }
  }
  </code></pre>
  
  <p>When i try to use in <code>Fragment</code></p>
  
  <pre><code> MyApplication.activeRouteId=2
  </code></pre>
  
  <p>but at the same time it shows -1 value while using from service.</p>
  
  <p>I am changing value of this variable from Fragment.</p>