I have written a sample widget with text view. I added onClickListener Event on the widget, that opens my activity. Now how to update the widget, when the activity is finished?
On Sat, May 26, 2012 at 2:05 AM, Sunil Mishra <suniljmis...@gmail.com>wrote:
> I want to pass data from activity to widget.
You don't "pass data" to a widget. It's a shell. It just shows something.
You do your logic in your Activity or Service, then update the look of the
widget to reflect the state of the data.
When I click on the widget, an activity having a edittextview is
displayed, now user type in that and clicks on save, the content which
he typed needs to be displayed on the widget.
I am able to see the contents, but it is not displayed instantly. It
is updated after some time.
On May 26, 12:29 pm, TreKing <treking...@gmail.com> wrote:
> On Sat, May 26, 2012 at 2:05 AM, Sunil Mishra <suniljmis...@gmail.com>wrote:
> > I want to pass data from activity to widget.
> You don't "pass data" to a widget. It's a shell. It just shows something.
> You do your logic in your Activity or Service, then update the look of the
> widget to reflect the state of the data.
I just want, that once i close the activity, the data i entered in
edittext should appear on the widget. I dont know how much time it
actually takes, but it does not show the message immediately
On May 26, 2:11 pm, TreKing <treking...@gmail.com> wrote:
On Sat, May 26, 2012 at 4:17 AM, Sunil Mishra <suniljmis...@gmail.com>wrote:
> I just want, that once i close the activity, the data i entered in
> edittext should appear on the widget. I dont know how much time it
> actually takes, but it does not show the message immediately
You didn't answer a single one of my questions. I'm not sure how you want
me to help you if you're not going to provide information to do so.
Good luck with your problem.
--------------------------------------------------------------------------- ----------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices
You can use AppWidgetManager and its methods outside of a widget's onUpdate.
So either broadcast an action to your widget provider telling it to update, or implement the updating somewhere else.
-- K
26.05.2012 13:17, Sunil Mishra написал:
> I just want, that once i close the activity, the data i entered in
> edittext should appear on the widget. I dont know how much time it
> actually takes, but it does not show the message immediately
> On May 26, 2:11 pm, TreKing<treking...@gmail.com> wrote:
>> On Sat, May 26, 2012 at 3:49 AM, Sunil Mishra<suniljmis...@gmail.com>wrote:
>>> I am able to see the contents, but it is not displayed instantly. It is
>>> updated after some time.
>> What is "some time"? What are you doing now? What have you tried?
>> --------------------------------------------------------------------------- ----------------------
>> TreKing<http://sites.google.com/site/rezmobileapps/treking> - Chicago
>> transit tracking app for Android-powered devices