There is really no such thing as a global "data sync".  You can write a
SyncAdapter to take care of syncing with a particular content provider, and
decide when to sync.  You can register a ContentObserver to see when the
data inside of a content provider changes.  A global concept of sync isn't
really there.

On Thu, Feb 18, 2010 at 2:09 PM, Alex Corbi <[email protected]> wrote:

> HI,
>
> is there a way for an app to know when a data sync happens?
>
> It would be just great to be able to Register a BroadcastReceiver and
> handle that action, in my case instead of fire a data synchronization
> i would like to detect when it happens.
>
> is it possible?
>
> On Jan 25, 6:59 pm, Dianne Hackborn <[email protected]> wrote:
> > You don't need to force a sync, when data changes on the servers the
> device
> > is told and will get it.
> >
> > This action probably should never have been made public, and I don't
> think
> > it does anything at this point.
> >
> > On Mon, Jan 25, 2010 at 9:44 AM, Vikas1976 <[email protected]
> >wrote:
> >
> >
> >
> >
> >
> > > I am on board with this.  I have an app that sends a new entry to
> > > Google Calendar in the cloud; I would like to be able to force a sync
> > > with Google after adding the entry so that the entry shows up in the
> > > user's calendar on the device shortly after being added.  Is there
> > > anyone who has experience using ACTION_SYNC to let us know what sort
> > > of other information e.g. category or data that needs to be passed to
> > > the resolver in the intent to let the phone know to sync with Google?
> > > Does anyone know if the AccountManager is a way to get this done?
> >
> > > Vikas
> >
> > > On Jan 20, 12:20 pm, Arno den Hond <[email protected]> wrote:
> > > > i would like to trigger the "synchronize now" feature (in the sync
> > > > settings screen) from my app.
> > > > i have found Intent.ACTION_SYNCbut the documentation states
> >
> > > > Activity Action: Perform a data synchronization.
> > > > Input: ?
> > > > Output: ?
> >
> > > > after creating the intent according to the action name, i used
> > > > PackageManager's queryIntentActivities method (with flag
> > > > GET_INTENT_FILTERS) and found that no ResolveInfo objects are
> returned
> >
> > > > ideas on how to perform a data synchronization would be greatly
> > > > appreciated
> >
> > > --
> > > 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]<android-developers%[email protected]><android-developers%2Bunsubs
> [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]<android-developers%[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