title: android app should open when we double tap on widget
body: <p>I want my widget to open the application only when the user double taps on it.How do i implement it?
  Below is the code for normal single tap widget which i have till now.</p>
  
  <pre><code>@Override
  public void onUpdate(Context context, AppWidgetManager appWidgetManager,
      int[] appWidgetIds) 
  {
      super.onUpdate(context, appWidgetManager, appWidgetIds);
      final int n=appWidgetIds.length;
      for(int i=0;i&lt;n;i++)
      {   
          int awid=appWidgetIds[i];
          RemoteViews v=new RemoteViews(context.getPackageName(),R.layout.widget);
          Intent in=new Intent(context,MainActivity.class);
          PendingIntent pi=PendingIntent.getActivity(context,0,in,0);
          v.setOnClickPendingIntent(R.id.bopen, pi);
          appWidgetManager.updateAppWidget(awid,v);
  
      }
  </code></pre>
  
  <p>}
  Any help will be appreciated.thank you.!</p>