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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:29:57+00:00 2026-05-29T13:29:57+00:00

A project I’m currently working on requires the application to discover all audio tracks

  • 0

A project I’m currently working on requires the application to discover all audio tracks on an android device. In addition to the tracks, it must also be able to group them by album and artist.

I found the MediaStore content provider and set about creating a database helper utility class to quickly return the IDs of tracks, albums and artists. I have been able to query the Media Store which returns some result, but it appears that not all of the audio information is stored there.

For example, querying for all artists returns only 9 results, but the Android Music Player application returns 27.

I am using the following code to query the artists:

ContentResolver resolver = getContentResolver();
String[] projection = new String[]{MediaStore.Audio.ArtistColumns.ARTIST};
Uri uri = android.provider.MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI;

Cursor c = null;

    try {
        c = resolver.query(uri, projection, null, null, null);
    } 
    catch (UnsupportedOperationException e) {
        Log.e("DatabaseHelper", "query: " + e);
        c = null;
    }

    if(c != null) {
        while(c.isAfterLast() == false) {
            Log.e("ARTIST", "NAME: " + cursor.getString(0));
            cursor.moveToNext();
        }
    }

It seems as if the Media Scanner (which is definatley run when my device boots up) is not detecting much of my audio library. Am I doing something wrong?

I am simply trying to find all audio tracks, audio albums and audio artists quickly and efficiently. If MediaStore can’t help me then I fear I will have to implement some form of file scanner to traverse directory structures and build my own database, but I don’t want to do that 😉

Any thoughts would be much appreciated.

Thanks.

  • 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-29T13:29:59+00:00Added an answer on May 29, 2026 at 1:29 pm

    Probably, You should also query android.provider.MediaStore.Audio.Albums.INTERNAL_CONTENT_URI to get the rest visible in media player.

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

Sidebar

Related Questions

Project Description: I have to make an application in android which gets the Latitude
Python project looks like this: setup.py README Application scripts hello.py shell_scripts date.sh From hello.py
Project I'm working on uses jQuery. I have a series of Ajax calls being
Project file here if you want to download: http://files.me.com/knyck2/918odc So I am working on
Project A is an android library project in my workspace(via project properties->android->library: is library).
My project is currently hosted in a private repository. I'm looking to introduce a
The project I am working on right now involves me reading words from a
Project A - Web Application/Website Project B - Unit Test Application I'm familiar how
A project I am working on only builds with maven-2.2: for earlier versions, the
A project I'm working on at the moment involves refactoring a C# Com Object

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.