Back to project page Volume-Setter.
The source code is released under:
GNU General Public License
If you think the Android project Volume-Setter listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fr.android.volumesetter; /*from w w w. j a va2 s .com*/ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.widget.RemoteViews; public class WidgetIntentReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if(intent.getAction().equals("volumesetter.action.LOAD_CONFIG")){ updateWidgetPictureAndButtonListener(context); } } private void updateWidgetPictureAndButtonListener(Context context) { RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.layout_widget); MainActivity.widgetLoadBoolean(context); remoteViews.setOnClickPendingIntent(R.id.widget_image, WidgetProvider.buildButtonPendingIntent(context)); WidgetProvider.pushWidgetUpdate(context.getApplicationContext(), remoteViews); } }