good news about android 2.x but actually, i want to make my application
available for all major android version, like 1.6 and if possible 1.5

i'm still searching information.
actually i'm trying to understand reflect mechanism, to see if i can call
HIDE method and class and act on sync setting.
but for now nothing work :-(



On Tue, Apr 20, 2010 at 16:25, cpphool <cpph...@gmail.com> wrote:

> [android 2.x]
>
> as far as i know, Android 2.x introduces completely new sync mechanism
> (allowing use to use multi accounts). In order to check whether global
> auto-sync is on, you can use:
>
>  ContentResolver.getMasterSyncAutomatically();
>
> and to switch it on:
>
>  ContentResolver.setMasterSyncAutomatically(true);
>
> [android 1.x]
>
> Did you find something about 1.6? and are you able to change auto-sync
> settings in 1.5?
>
> I tried with this snippet:
>
>  final Uri CONTENT_URI = Uri.parse("content://sync/settings");
>  ContentValues values = new ContentValues();
>  values.put("name", "sync_provider_contacts");
>  values.put("value", true);
>  getContentResolver().insert(CONTENT_URI, values);
>
> The value changes to "1" instead of "true" and it doesn't affect sync
> settings.
>
> On 16 Kwi, 17:53, zehunter <zehunte...@gmail.com> wrote:
> > hi,
> >
> > i'm not able to find any example or documentation or tutorial about
> > how to enable or disable sync (background data and auto sync)
> > programmaticaly, even if i can found many widget that can do that
> > without root access or such.
> >
> > is it something secret? :-)
> > can any one may be good enough to help me and explain how this work
> > and how to implement that into my code?
> >
> > i found some trick with URI and content://sync/setting but it seems to
> > be not possible with android 1.6 at least :-( any idea why? and what
> > replaced this?
> >
> > thanks a thousand time for all people that will answer to me.
> > best regards,
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> > For more options, visit this group athttp://
> groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Reply via email to