title: Processing more than one button click at Android Widget
body: <p>I <a href="https://stackoverflow.com/questions/2082998/how-to-implement-a-button-on-an-android-widget">saw this topic</a> and implement <code>IntentService</code> as describes, but what if I want more than one button? How can I distinguish button from each other?
  I'm trying to <code>setFlags</code>, but cannot read it at <code>onHandleIntent()</code> method:</p>
  <pre><code>public static class UpdateService extends IntentService {
  ...
  
      @Override
      public void onHandleIntent(Intent intent) {
          ComponentName me = new ComponentName(this, ExampleProvider.class);
          AppWidgetManager manager = AppWidgetManager.getInstance(this);
          manager.updateAppWidget(me, buildUpdate(this));
      }
  
      private RemoteViews buildUpdate(Context context) {
          RemoteViews updateViews = new RemoteViews(context.getPackageName(), R.layout.main_layout);
  
          Intent i = new Intent(this, ExampleProvider.class);
          PendingIntent pi = PendingIntent.getBroadcast(context, 0, i, 0);
          updateViews.setOnClickPendingIntent(R.id.button_refresh, pi);
  
          i = new Intent(this, ExampleProvider.class); 
          pi = PendingIntent.getBroadcast(context, 0, i, 0);
          updateViews.setOnClickPendingIntent(R.id.button_about, pi);
  
          return updateViews;
      }
  }
  </code></pre>
  <p>At this little piece of code I have two <code>PendingIntent</code> linked with <code>setOnClickPendingIntent</code>, can I distinguish this intent for different actions and processing?
  Thanks for the help!</p>