I am in AppWidgetProvider
class. I want to call a static block before any callback method, but I need the context inside my static block. How can I get that?
Below is my code:
public class widgetClass extends AppWidgetProvider {
static
{
// here i want the context
}
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds){
}
Override onEnabled
instead of using a static block.