Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 727143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:32:02+00:00 2026-05-14T06:32:02+00:00

I have this code for update: public Boolean update() { try { data.put(ContactsContract.Groups.SHOULD_SYNC, true);

  • 0

I have this code for update:

public Boolean update() {
  try {
   data.put(ContactsContract.Groups.SHOULD_SYNC, true);

   ContentResolver cr = ctx.getContentResolver();
   Uri uri = ContentUris.withAppendedId(ContactsContract.Groups.CONTENT_URI, Long.parseLong(getId()));
   int mid = cr.update(uri, data,_ID+"="+getId(), null);

   // notify registered observers that a row was updated
   ctx.getContentResolver().notifyChange(
     ContactsContract.Groups.CONTENT_URI, null);

   if (-1 == mid)
    return false;

   return true;
  } catch (Exception e) {
   Log.v(TAG(), e.getMessage(), e);
   return false;
  }
 }

I have values in data, I double checked, and for some reason the values are nut pushed out. I also ran a cur.requery(); and I am having

<uses-permission android:name="android.permission.WRITE_CONTACTS"></uses-permission>

EDIT 1
One thing to mention, that I need to use:

data.put(ContactsContract.Groups.SHOULD_SYNC, 1);

as the true value there is not accepted, although that is returned when you check the ContentValues.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:32:03+00:00Added an answer on May 14, 2026 at 6:32 am

    Ok, I figured it down too:

    SQLiteException: no such column: res_package: , while compiling: UPDATE groups SET sync4=?, sync3=?, sync2=?, group_visible=?, system_id=?, sync1=?, should_sync=?, deleted=?, account_name=?, version=?, title=?, title_res=?, _id=?, res_package=?, sourceid=?, dirty=?, notes=?, account_type=? WHERE _id=20

    The weird thing is that, this column is returned when you Query the content provider. I made the queries to use all returned columns, so I need to make this work somehow.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 497k
  • Answers 497k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If dataArray is storing a value when this method is… May 16, 2026 at 11:54 am
  • Editorial Team
    Editorial Team added an answer I figured it out but I still cannot keep writing… May 16, 2026 at 11:54 am
  • Editorial Team
    Editorial Team added an answer This is a simple override that draws an image. -… May 16, 2026 at 11:54 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have 2 files: xxxxxTest.java [ refer this ] public class xxxxxTest extends TestCase
UPDATE - No need to answer this now, I have solved below. Hi, I'm
Im working on a small application to try out an idea that I have.
Sup Guys, I Have a Function on my frmMain Class wich will update my
Here is the code below I tried this call but it didnt work... even
I have extended jEditorPane as shown below (minus the instantiation code). However, when I
We have a third party application that accept calls using an XML RPC mechanism
I have built a two-player tic tac toe game in Java, using sockets (no
In my limited experience, I've been on several projects that have had some sort
I'm experiencing an intermittent problem with a class that extends javax.swing.text.DefaultStyledDocument . This document

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.