title: Android Shared Preferences Updating
body: <p>I have two projects/packages part of the same application.  The main project of the application does virtually everything on the app.  However, we used a 2nd project to manage updates to the application.  We are using shared preferences that are updated from the sqlite3 database and applied in the main application using </p>
  
  <pre><code>    editor.putString("string", sString).apply();
  </code></pre>
  
  <p>We also use the following logic to see if its a new version and if so restart the autoupdate package</p>
  
  <pre><code>    if (!sCurrentVersion.equals(ver)) {
          Intent intent1 = new Intent(Intent.ACTION_MAIN);
          PackageManager manager = getPackageManager();
          intent1 = manager.getLaunchIntentForPackage("com.pack.autoupdate");
          intent1.addCategory(Intent.CATEGORY_LAUNCHER);
          startActivity(intent1);
      }
  </code></pre>
  
  <p>Then in the autoupdate package, we simply just use getSharedPreferences().  The values we need in the shared preferences are the update urls that the autoupdate package needs to check.</p>
  
  <p>Our problem is that we updated those urls in the database, however we are still getting some devices that are using the old urls in the autoupdate check.  Do I need to make sure and restart autoupdate or is there something i'm doing wrong with sharedpreferences?</p>