title: Starting activity on clicking on widget layout
body: <p>I have widget and i am showing some data on it and i want to open some Activity on clicking on widget i tried all the things from google but its not working.I hope i will get some help from here.I am a newbie in widget Please Help 
  Thanks in advance</p>
  
  <pre><code>public class NewAppWidget extends AppWidgetProvider {
  public static RemoteViews views;
  
  static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,
                              int appWidgetId) {
  
      CharSequence widgetText = NewAppWidgetConfigureActivity.loadTitlePref(context);
      CharSequence notetext = NewAppWidgetConfigureActivity.loadNotePref(context);
      views = new RemoteViews(context.getPackageName(), R.layout.new_app_widget);
      views.setTextViewText(R.id.appwidget_text, widgetText);
      views.setTextViewText(R.id.wd_note, notetext);
      appWidgetManager.updateAppWidget(appWidgetId, views);
  
  
  
  }
  
  @Override
  public void onReceive(Context context, Intent intent) {
  
  }
  
  @Override
  public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
      // There may be multiple widgets active, so update all of them
      for (int appWidgetId : appWidgetIds) {
          updateAppWidget(context, appWidgetManager, appWidgetId);
          RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.new_app_widget);
          Intent configIntent = new Intent(context, NewAppWidget.class);
  
          PendingIntent configPendingIntent = PendingIntent.getActivity(context, 0, configIntent, 0);
  
          remoteViews.setOnClickPendingIntent(R.id.widget_layout, configPendingIntent);
          appWidgetManager.updateAppWidget(appWidgetIds, remoteViews);
  
  
      }
  
  }
  
  
  
  
  @Override
  public void onDeleted(Context context, int[] appWidgetIds) {
      // When the user deletes the widget, delete the preference associated with it.
      for (int appWidgetId : appWidgetIds) {
          NewAppWidgetConfigureActivity.deleteTitlePref(context, appWidgetId);
      }
  }
  
  @Override
  public void onEnabled(Context context) {
  
  }
  
  @Override
  public void onDisabled(Context context) {
      // Enter relevant functionality for when the last widget is disabled
  }
  }
  </code></pre>