onActivityResult return null getExtra value after return back from permission dialogue
<p>Here is my code:<code>
    final Intent intent = new Intent(this, SelectWidgetActivity.class);
    startActivityForResult(intent, REQUEST_CREATE_APPWIDGET);</code></p>

<pre><code>@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {

    if (resultCode == RESULT_OK ) {
        String selectedName = data.getStringExtra(SelectWidgetActivity.SELECTED_WIDGET);
        if(!mAppWidgetManager.bindAppWidgetIdIfAllowed(appWidgetId, info.provider)) {
                    Intent bindIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_BIND);
                    bindIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
                    bindIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_PROVIDER, info.provider);
                    bindIntent.putExtra(SelectWidgetActivity.SELECTED_WIDGET, selectedName);
                    startActivityForResult(bindIntent, REQUEST_BIND_APPWIDGET);
        }
    }
}
</code></pre>

<p>I put String on the first call of startActivityForResult and on the second call I'm trying to get the same string, but getting null. For example on the first call selectedName="Calendar", the second call onActivityResult() selectedName=null</p>

<p>Any ideas?</p>