Back to project page android-NSUWeather.
The source code is released under:
MIT License
If you think the Android project android-NSUWeather 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.mbelsky.nsuweather.utils; //from w ww. j a v a2s. c om import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ComponentName; import android.content.Context; /** * @author mbelsky 25.12.14 */ public class AppWidgetHelper { public static int[] getAppWidgetIds(final Context context, final AppWidgetManager appWidgetManager, final Class<? extends AppWidgetProvider> widgetProviderClass) { ComponentName thisAppWidget = new ComponentName(context.getPackageName(), widgetProviderClass.getName()); int[] appWidgetIds = appWidgetManager.getAppWidgetIds(thisAppWidget); return appWidgetIds; } }