Widget not clickable


Last Updated:

  1. pep987

    pep987 New Member This Topic's Starter

    Joined:
    Sep 6, 2010
    Messages:
    2
    Likes Received:
    0
    Hi, I am new to programming android, and have managed to cobble together a simple widget to turn the Master Sync option on and off. However when I click the widget it does nothing. Can someone advise me why?

    This is the body of my Master Sync code:

    public class MasterSync extends AppWidgetProvider {
    /** Called when the activity is first created. */
    @Override

    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {

    final int N = appWidgetIds.length;

    // now label the property of the button
    boolean sync = ContentResolver.getMasterSyncAutomatically();

    if (sync){

    ContentResolver.setMasterSyncAutomatically(false);}
    else
    //
    if (!sync){

    ContentResolver.setMasterSyncAutomatically(true);
    }

    }}
     

    Advertisement
  2. pep987

    pep987 New Member This Topic's Starter

    Joined:
    Sep 6, 2010
    Messages:
    2
    Likes Received:
    0
    Anyone???
     

Share This Page

Loading...