My widget is retriving last 5 posts from RSS. User can click widget to refresh data and can click arrows (next/prev) to navigate through posts.
I try to make widget with shared preferences. Everything I working fine unitl I add second instance of the same widget. Then second one override first settings. I try to make something like this:
(Configure widget activity):
public static String PREFS_NAME = "my_name" + ID_WIDGET;
or
editor.putString("login_" + mAppWidgetId, _loginEdit.getText().toString());
But I have problem with retrive this data - I can't retrive widget id. I tried many solutions but none of them work for me.
ComponentName name = new ComponentName(contextApp, TweetWidget.class);
int [] ids = AppWidgetManager.getInstance(contextApp).getAppWidgetIds(name);
Here I have ids but I need widget id which one was clicked by user - update information in the widget. Anyone have working solution?