I'm trying to pass a string value from a widget configuration class to appWidgetProvider class. I've read that you pass a string between classes like this:
In current activity, create an intent
Intent i = new Intent(getApplicationContext(), ActivityB.class);
i.putExtra(key, value);
startActivity(i);
then in the other activity, retrieve those values.
Bundle extras = getIntent().getExtras();
if(extras !=null) {
String value = extras.getString(key);
}
(for the "key" I declared a string)
but when writing the retrieve code into my appWidget provider is gives me an error saying: The method getIntent() is undefined for the type Widget
what do I do?
thanks very much