I just want to know how big my current widget is. I found tons of questions to set the minimum size, but I don\'t want to set it. Instead I want to show that informations which
For Android 4.1 (API 16) or high:
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance( context );
int ids[] = appWidgetManager.getAppWidgetIds( componentName );
for( int id : ids ){
Bundle options = appWidgetManager.getAppWidgetOptions( id );
int width = options.getInt (AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH);
int height = options.getInt (AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT);
}