title: Android Service is not running in background properly
body: <p>As soon as i open my application, i start this line :</p>
  
  <pre><code>Intent intent = new Intent(this, MyIntentService.class);
          startService(intent);
  </code></pre>
  
  <p><strong>And here's my IntentService Class:</strong></p>
  
  <pre><code>public class MyIntentService extends Service {
      SharedPreferences prefs;
      public static String prefName = "SecretFile";
      public static String version = "56";
      public final static int uniqueID = 1394885;
  
  
  
  public void onCreate() {
          super.onCreate();
          prefs = this.getSharedPreferences(prefName, MODE_PRIVATE);
          version = prefs.getString("Version", "1");
          System.out.println(version);
          calllsharedprefs();
          new loadSomeStuff().execute();
      }
  
  public class loadSomeStuff extends AsyncTask&lt;String, Integer, String&gt; {
  
      protected void onPreExecute() {
  
      }
  
          @Override
          protected String doInBackground(String... params) {
  //starting script
                      JSONObject json = jArray.getJSONObject(i);
                      json.getString("Version");
                      Editor editoi = prefs.edit();
                      editoi.putString("Version", json.getString("Version"));
  //finishing script
          }
  
          protected void onProgressUpdate(Integer... progress) {
  
          }
  
          @SuppressWarnings("deprecation")
          protected void onPostExecute(String result) {
              if (prefs.getString("Version", "1").equals(version)) {
              } else {
                  System.out.println(prefs.getString("Version", "1"));
                  NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
                  nm.cancel(uniqueID);
                  Intent intent = new Intent(MyIntentService.this, Drawer.class);
                  PendingIntent pi = PendingIntent.getActivity(
                          MyIntentService.this, 0, intent, 0);
                  String body = "New Updates are available!";
                  String title = "Price list changed";
                  Notification n = new Notification(
                          R.drawable.about, body,
                          System.currentTimeMillis());
                  n.setLatestEventInfo(MyIntentService.this, title, body, pi);
                  n.defaults = Notification.DEFAULT_ALL;
                  nm.notify(uniqueID, n);
                  version = prefs.getString("Version", "1");
              }
          }
      }
  </code></pre>
  
  <p>Basically, i'm getting the Version field from a table in phpMyAdmin, if the version code is the same dont send notification if it's not send a notification and set it as the same as phpmyadmin version, <strong>BUT</strong> however when i open my application the code starts and it sends me a notification, but when i re-edit the value from the table to set it like 9, it doesn't work it doesn't send anotificaiton again! what to do? Thanks =)</p>