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

  • SEARCH
  • Home
  • 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 7761627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:11:08+00:00 2026-06-01T14:11:08+00:00

When i am deleting a SMS message from android system, with this code: context.getContentResolver().delete(

  • 0

When i am deleting a SMS message from android system, with this code:

context.getContentResolver().delete(
                            Uri.parse("content://sms/"), "_id=?",
                            new String[] { String.valueOf(_id) });

sometimes, it will pop this exception, and … i don’t know how this happens. is it the problem of the system’s Sqlite module?

android.database.sqlite.SQLiteException: near "(": syntax error: , while compiling: SELECT _id FROM threads WHERE _id IN (SELECT DISTINCT thread_id FROM sms UNION SELECT DISTINCT thread_id FROM pduWHERE (_id=?))
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:158)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
at android.content.ContentProviderProxy.delete(ContentProviderNative.java:487)
at android.content.ContentResolver.delete(ContentResolver.java:692)
at com.comodo.a.e.l.onChange(Unknown Source)
at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:43)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3686)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
at dalvik.system.NativeStart.main(Native Method)
  • 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-06-01T14:11:09+00:00Added an answer on June 1, 2026 at 2:11 pm
     String WHERE =""; //any criteria or where condition
     String pid = cursor.getString(0); // Get id;
     String uri = "content://sms/" + pid;
     context.getContentResolver().delete(Uri.parse(uri),  WHERE, null);
    

    by using this code you can delete sms based on any condition….

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

Sidebar

Related Questions

I' m trying to enable adding/deleting rows to/from table using folowing code: Script: $(document).ready(function()
Deleting a row from a view, will it delete the appropriate rows from the
For deleting a value from keychain following code is available: [SFHFKeychainUtils deleteItemForUsername:XYZ andServiceName:@known error:&err]
I want to delete some certain SMS automatically in my Android application. Therefore I
I'm having problems deleting a file from a higher directory, I found this post
I am deleting a single path from the Django cache like this: from models
We have a problem deleting Appointments from Exchange using EWS. We try to delete
when deleting an entity in nhibernate i get an exception with this error message:
I have two tables without any cascade deleting. I want to delete parent object
During swype deleting (most importatnt lines of this method): - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath

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.