Back to project page UltraExplorer.
The source code is released under:
GNU General Public License
If you think the Android project UltraExplorer 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 com.mirrorlabs.widgets; //from w ww. j a va 2s. c o m import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.util.Log; public class ExampleAppWidgetProvider1 extends AppWidgetProvider { private static final String LOG = "com.mirrorlabs.filebrowser"; @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.w(LOG, "onUpdate method called"); // Get all ids ComponentName thisWidget = new ComponentName(context, ExampleAppWidgetProvider1.class); int[] allWidgetIds = appWidgetManager.getAppWidgetIds(thisWidget); // Build the intent to call the service Intent intent = new Intent(context.getApplicationContext(), UpdateWidgetService1.class); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, allWidgetIds); // Update the widgets via the service context.startService(intent); } }