title: Android Intent putExra data does not work on retriever side
body: <p>I am new to Android,
  I am updating a TextView on Widget with the help of configuration Activity. It works fine. Same text view needs to be updated to refresh button click. For that I am passing Widget ID through Intent but on receiver side unable to receiver widget ID and hence Text view could not be updated.</p>
  
  <p>Setting up Intent, in Widget_Provider</p>
  
  <pre><code>Intent refreshIntent = new Intent(context, refreshWidgetActivity.class);
  refreshIntent.setAction(ACTION_WIDGET_REFRESH);
  PendingIntent refreshPendingIntent = PendingIntent.getActivity(context, 0, 
  refreshIntent, 0);
  remoteViews.setOnClickPendingIntent(R.id.button3, refreshPendingIntent);
  refreshIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,appWidgetIds[0]);
  </code></pre>
  
  <p>On received Activity end,</p>
  
  <pre><code>Intent intent = getIntent();
  Bundle extras = intent.getExtras();
  if (extras != null) {
  mAppWidgetId = extras.getInt(
  AppWidgetManager.EXTRA_APPWIDGET_ID, 
  AppWidgetManager.INVALID_APPWIDGET_ID);
  }
  
  if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {
  finish();
  }
  </code></pre>
  
  <p>Here 0 is found in extras instead of Widget ID, Please help.</p>