Open main-activity one time
<p>For my news-reader app, I made a widget. Using the widget it is possible to start the news-app. But if the user goes back to the home screen, with the back button, there still is an instance of the application. So if the user goes the applications-list (all the app's) and start the news-app again. There are 2 instances of the news app :S For closing the app, the users needs to push 2 times on the back button (because you see 2 times the same app). Can I do anything about it?</p>

<p>Here my code:</p>

<pre><code>static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,
        int appWidgetId) {


    Intent configIntent = new Intent(context, Main.class);
    PendingIntent configPendingIntent = PendingIntent.getActivity(context, 0, configIntent, 0);

    RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget);

    remoteViews.setOnClickPendingIntent(R.id.headlinesBox, configPendingIntent);

    // Tell the widget manager
    appWidgetManager.updateAppWidget(appWidgetId, remoteViews);
</code></pre>

<p>}</p>
