Launch activity from AppWidget in Android
<p>I am trying to launch an Activity from my AppWidget but it never opens. What am I doing wrong?</p>

<pre><code>public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) 
    {
        RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);             


    Intent intent = new Intent(context, EditActivity.class);
                PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, Intent.FLAG_ACTIVITY_NEW_TASK); 
                remoteViews.setOnClickPendingIntent(R.id.btnEditConfiguration, pendingIntent);

                appWidgetManager.updateAppWidget(thisWidget, remoteViews);      
            }
</code></pre>

<p>//activity</p>

<pre><code>    public class EditActivity extends Activity 
    {
         public void onCreate(Bundle savedInstanceState) 
            {       
                super.onCreate(savedInstanceState);
                setContentView(R.layout.configure);                    
            }
    }
</code></pre>
