So im trying to start an activity by pressing a widget. I keep running into the error \"The method startActivity(Intent) is undefined for the type Photos\" any help is much
What method have you put this code in? AppWidgetProvider
does not have a startActivity()
method. You need a Context
for that. Several of AppWidgetProvider
's callback methods give you access to a Context
object, but it all really depends on what you intend to do.
I suggest you take a look at the Android developer guide's documentation on AppWidgets here.