Single Configuration Activity for multiple Homescreen Widgets
<p>I have one Configuration Activity for different Hoomescreen Widgets for my Android App.</p>

<p>I get the WidgetId in the Configuration Activity like this:</p>

<pre><code>widgetid = extras.getInt(
       AppWidgetManager.EXTRA_APPWIDGET_ID, 
       AppWidgetManager.INVALID_APPWIDGET_ID);
</code></pre>

<p>But later in the code I want to know which WidgetProvider class has called the Configuration Activity. How can i do this?</p>

<p><strong>P.S.</strong></p>

<p>I've found the answer:</p>

<pre><code>AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
AppWidgetProviderInfo appWidgetManager.getAppWidgetInfo(widgetid);
</code></pre>
