title: Android Using Application Context Inside Widget For Pending Intent
body: <p>A WidgetProvider button will use a <code>PendingIntent</code> to communicate.<br>
  Inside the <code>onUpdate(Context ...)</code> method of the WidetProvider the following line appears:</p>
  
  <pre><code>PendingIntent buttonPendingIntent = PendingIntent.getBroadcast(context, 0, buttonIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  </code></pre>
  
  <p>Which context is being passed in by the widget manager android?</p>
  
  <p>Is it ok to use <code>context.getApplicationContext()</code> for the <code>PendingIntent</code>? As I have found that the widget freezes are a certain about of time and different application conditions, even though onUpdate gets called. Using <code>context.getApplicationContext()</code> seems to help.</p>