title: Check if a widget is exists on homescreen using appWidgetId
body: <p>I am using <code>AlarmManager</code> to update my widgets. And I want to stop it if there is no widget on homescreen. But I am facing a problem with detecting if there is no widget on home screen. </p>
  
  <p>As whenever I try to get the AppWidgetIds using this way:</p>
  
  <pre><code>AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
  
  int[] appWidgetIDs = appWidgetManager
      .getAppWidgetIds(new ComponentName(context, Widget.class));
  </code></pre>
  
  <p>I get the a length of <code>appWidgetIDs</code> while actually there is no widget on homescreen. <strong>Why?</strong></p>
  
  <p>Therefore, I would like to know if there is a way to detect that a widget id is exists on homescreen.</p>
  
  <p>Thank you upfront.</p>