problems with getting value from SharedPreferences
<p>i have this code i call from a service.</p>

<pre><code>   prefs = getSharedPreferences(homeConfigure.APP_PREF_NAME, Context.MODE_PRIVATE);
   city = prefs.getString(CITY + appWidgetId,"nothing");
</code></pre>

<p>it returns the correct value stored. but subsequent calls to the service through an AlarmManager in the service class returns the value "nothing". </p>

<p>what could be wrong?</p>

<p>i save them in the homeConfigure activity like this:</p>

<pre><code>city = cityText.getText().toString();    
Editor editor = prefs.edit();   
editor.putString(CITY + appWidgetId,city);  
editor.commit();
</code></pre>

<p>and the appwidget is obtained from an intent in the onCreate() of the configuration class when the widget is first added:</p>

<pre><code>appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
</code></pre>
