Cannot open a new activity from AppWidgetProvider.
<pre class="lang-java prettyprint-override"><code>public void onEnabled (Context contex){
System.out.println("new task flag");
Intent i = new Intent(contex, ReadName.class);

i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(i);
}
</code></pre>

<p>Can you guys tell me what the problem is with this code?</p>
