Two possible choices:

(1) Keep track of which activity(ies) are displaying data from the database
in a list of callbacks, so you can tell them when you change the data.

(2) Implement your database with a ContentProvider, which has a standard
model for reporting and responding to changes.

On Sat, May 7, 2011 at 7:26 PM, RegisMelo <[email protected]> wrote:

> Hello Everybody,
>
>   I am developing an app that needs to refresh an information every X
> minutes from a remote server. To do that I am scheduling an Alarm in
> Android and persisting the data retrieved in a SQLite table.
>
>   App's main activity shows this list retrieving from the same table
> in SQLite. My doubt is very simple - how can I say to main activity
> that exists fresh information in local database so the activity can
> run a cursor.requery() to refresh the screen?
>
> Regards,
>
> RM
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to