私は2つのボタンでウィジェットを作成しています。 それらの1つはウィジェットのコンテンツを更新し、2つ目はウィジェットを起動する必要があります。PendingIntentsを持つ2つのボタン - ウィジェット
私はそれぞれのアクションに対して2つのPendingIntentを持っていますが、それらを両方とも動作させることはできません。一方がうまく動作しない場合、他方は動作しません。
私はコードを改訂し、何が間違っているのか理解できません。
ご協力いただきますようお願い申し上げます。
これはコードです。
RemoteViews controls = new RemoteViews(context.getPackageName(), R.layout.miwidget);
Intent intent = new Intent("actony.com.ACTUALIZAR_WIDGET");
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId);
Intent intentSettings = new Intent();
intentSettings.setClass(context,WidgetConfig.class);
PendingIntent pendingIntentUpdate = PendingIntent.getBroadcast(context, widgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT);
controls.setOnClickPendingIntent(R.id.BtnActualizar, pendingIntentUpdate);
PendingIntent pendingIntentSettings = PendingIntent.getActivity(context, 0, intentSettings, 0);
controls.setOnClickPendingIntent(R.id.botonSettings, pendingIntentSettings);