title: setImageViewResource doesn't work if initialized inside an external function
body: <p>I'm building a homescreen widget and my goal is to set an image on the ImageView within this widget and I use <code>setImageViewResource()</code> for this. And it works perfectly - <i>means that the target image <code>R.id.user_button</code> changes its image resource to <code>R.drawable.activity_notification</code> after <code>onStart()</code> was executed</i> - if I use it like this:</p>
  
  <pre><code>public class UpdateWidgetService extends Service {
      public void onStart(Intent intent, int startId) {
          ... //Some code which is not really important
          RemoteViews remoteViews = new RemoteViews(this.getPackageName(),R.layout.widget_layout);
          remoteViews.setImageViewResource(R.id.user_button, R.drawable.activity_notification);
      }
  }
  </code></pre>
  
  <p>The problem is I have to put <code>setImageViewResource()</code> inside an <b>external function</b> and when try to build something like the code below it refuses to work - <i>means that image resource of the target image <code>R.id.user_button</code> remains unchanged after <code>onStart()</code> is executed</i>.</p>
  
  <pre><code>public class UpdateWidgetService extends Service {
      public void onStart(Intent intent, int startId) {
          ... //Some code which is not really important
          changeImagePicture();
      }
      public void changeImagePicture() {
          RemoteViews remoteViews = new RemoteViews(this.getPackageName(),R.layout.widget_layout);
          remoteViews.setImageViewResource(R.id.user_button, R.drawable.activity_notification);
      }
  }
  </code></pre>
  
  <p>I guess I'm a noob and I miss something really simple and very important here. Can you please point at my misstake so I can get my code to work at last ;)
  Merci beaucoup!</p>