ahmad aghazadeh ahmad aghazadeh - 1 year ago 90
Java Question

How to get widget id another application?

Code is written as follows:

Intent widget = new Intent(

ComponentName name = new ComponentName(
"test.widgets", "Widget1x2");

int[] ids = AppWidgetManager.getInstance(context)

I have get Ids widgets application test.widgets

Answer Source

Use it this way:

AppWidgetManager manager = AppWidgetManager.getInstance(context);
int[] ids = manager.getAppWidgetIds(new ComponentName(context,

This should work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download