daliz daliz - 1 year ago 129
Android Question

Can a home widget have a Context?

In an activity it's (usually) easy to get the Context.

What if I am working with a home widget class?
These are classes that extends AppWidgetProvider, which don't contain a Context!

Answer Source

An instance of Context is passed to all the methods in AppWidgetProvider for you to use.

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