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 7926269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:42:58+00:00 2026-06-03T18:42:58+00:00

Need help with deleting call log from multi numbers, using the following code i

  • 0

Need help with deleting call log from multi numbers, using the following code i can delete calls logs from an exatct number using a string, what i need is to be able to delete calls from the log from numbers in the string.

heres the code im using for deleting exact numbers:

String strUriCalls = "content://call_log/calls";
            Uri UriCalls = Uri.parse(strUriCalls);
            Cursor c = context.getContentResolver().query(UriCalls, null,
                    null, null, null);
            if (c.getCount() <= 0)

            {
                Toast.makeText(context, "Call log empty",
                        Toast.LENGTH_SHORT).show();
            }

            while (c.moveToNext())
            {
                //eg.what I need is:    String gonnabpref = "0750627663 09876756446 08987766545 0908977534";
                String gonnabpref = "0750627663";
                String queryString = "NUMBER='" + gonnabpref + "'";
                Log.v("Number ", queryString);
                int i = context.getContentResolver().delete(UriCalls,
                        queryString, null);
                  if (i >= 1)

                {

Hope this makes sense (noob) any help much appreciated

  • 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-03T18:43:04+00:00Added an answer on June 3, 2026 at 6:43 pm

    try this way by split string on the basis of space:

    String gonnabprefd = "0750627663 09876756446 08987766545 0908977534";
    String[] numarry=gonnabprefd.split(" ");
    for(int i=0;i<numarry.length;i++)
    {
    String gonnabpref = numarry[i];
    String queryString = "NUMBER='" + gonnabpref + "'";
    Log.v("Number ", queryString);
    int i = context.getContentResolver().delete(UriCalls,
     queryString, null);
     if (i >= 1)
      {
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need help writing a script downloads data from google insight using c# this is
I need help getting the this week full date range in the following format:
I need help figuring out how to successfully redirect while including Analytics code. I
Can we delete the physical file from server when I delete the corresponding entry
Need help figuring out a couple common workflows with Github. I come from a
Need help. It may be weird. First activity has listview(like lazyadapter) once i click
need help to create regular expression matching string www.*.abc.*/somestring Here * is wild card
need help/guide for sql select query, I have 2 table stock and stock_history, in
need help regarding USSD Gateway. I have to develop an app, which will directly
need help in error in database pivot. i have table tamed table_score like below:

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.