如题:我在AndroidManifest.xml中作了如下声明:<!-- 配置widget的activity声明 -->
<activity android:name=".MissedCallConfigActivity">
  <intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE"/>
  </intent-filter>
</activity>
<receiver android:name="MyAppWidgetProvider">
  <intent-filter>
        <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.intent.action.PHONE_STATE" />
 </intent-filter>
 <meta-data android:name="android.appwidget.provider"
android:resource="@xml/example_appwidget_info">
</meta-data>
</receiver>然后在自己的appwidgetprovider中重写其onUpdate方法:
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
System.out.println("-----------hello update----------");
for(int i=0;i<appWidgetIds.length;i++){
Intent intent=new Intent(context,MissedCallConfigActivity.class);          
        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
        
        RemoteViews remoteViews = 
new RemoteViews(context.getPackageName(), R.layout.example_appwidget);
        remoteViews.setTextViewText(R.id.call_button, "200");
        remoteViews.setOnClickPendingIntent(R.id.call_button, pendingIntent);
        appWidgetManager.updateAppWidget(appWidgetIds[i], remoteViews);        
}
super.onUpdate(context, appWidgetManager, appWidgetIds);
}但是很奇怪的是,我在桌面上点击appwidget中的对应按钮时,并没有执行onUpdate方法?搞不清楚什么问题,本人新学android,求高手指点,谢谢。