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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:01:28+00:00 2026-05-20T12:01:28+00:00

I am trying to get call log by using the CallLog.Calls content provider. However,

  • 0

I am trying to get call log by using the CallLog.Calls content provider. However, I am little lost about the query I need to make. I am able to make a query and load the result in a ListView. But the query return all types of call.

Of course I can use a switch-case and take appropriate action as per the types of call returned. But for my program I only need the outgoing call logs.

So, how do I modify the query to get only outgoing call types. (I believe I have to use CallLog.Calls.OUTGOING_TYPE somewhere?). I have tried to modify the query in various ways but I keep getting error. If I try to supply the CallLog.Calls.OUTGOING_TYPE as an selection arg I get an error as its an int type and the query looks for String type.

I may be missing something simple, but can’t figure it out. Any help would be much appreciated. Thank You. Here’s my query below,

getContentResolver().query(CallLog.Calls.CONTENT_URI,null, null, null, ORDER_BY ); 
  • 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-20T12:01:28+00:00Added an answer on May 20, 2026 at 12:01 pm

    Try this code snippet:

    Cursor c = getContentResolver().query(CallLog.Calls.CONTENT_URI, null,
                                          CallLog.Calls.TYPE + "=?",
                                          new String[] { String.valueOf(CallLog.Calls.OUTGOING_TYPE) },
                                          ORDER_BY);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to call a webservice using ssl. How do i get the
I'm trying to get the call I just made/received. For that I'm using BroadcastReceiver
Below is my program and I am trying to get the call stack when
I am trying to get the program to call up the current date, add
I'm trying to get my head round this mind boggling stuff they call Database
I am trying to get the code found here: http://snipplr.com/view/26643/mbprogresshud-with-an-asynchronous-nsurlconnection-call/ to work in my
When trying to call Close or Dispose on an SqlDataReader i get a timeout
I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException:
When I'm trying to call an ascx with Jquery post I get: This type
I'm trying get values from a GridView using the following code: foreach (GridViewRow row

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.