This looks really weird. No Activity is involved in a widget, but you need a class extending AppWidgetProvider. That's where the onUpdate method goes.
In general, if you want to check which code of yours is called, add a Log.d(...) statement at appropriate places, e.g. between lines 4 and 5 here.
If you want to learn widgets, don't start from scratch creating one - it's not obvious what all you need to do. Start with a working one like
https://www.vogella.com/tutorials/AndroidWidgets/article.html, and work your way from there.