I have a list of widget apps. My problem is that I canβt find out which widget is currently active on the phone. I get a list of widget applications for this code,
AppWidgetManager manager1=AppWidgetManager.getInstance(ctx);
List<AppWidgetProviderInfo>infoList=manager1.getInstalledProviders();
for(AppWidgetProviderInfo info:infoList)
{
String component = ""+info.provider;
Log.i("Widget", ""+component);
}
ctx is a context object.
I can get the name of the active name of the application package, but in the case of widgets, I am not.
source
share