Android Intent putExra data does not work on retriever side
===

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.

Setting up Intent, in Widget_Provider

    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]);

On received Activity end,

    Intent intent = getIntent();
    Bundle extras = intent.getExtras();
    if (extras != null) {
    mAppWidgetId = extras.getInt(
    AppWidgetManager.EXTRA_APPWIDGET_ID, 
    AppWidgetManager.INVALID_APPWIDGET_ID);
    }
        
        // If they gave us an intent without the widget id, just bail.
    if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {
    finish();
    }
