Why do I sometimes get a null return, from ContentResolver query?

by sandy8531 » Sun, 08 Mar 2009 09:56:01 GMT

Sponsored Links
 My external sdcard is connected, mounted and functional. I have over
1000 songs on the sdcard, however occasionally this query returns a
null Cursor to me.

Can someone shed some light as to why this happens ? Can I get this is
the underlying table is locked by another thread ? Should I take a
null return from the query to mean a temporary error ?

String[] cols = {

Cursor c = context.getContentResolver().query
Media.IS_MUSIC + " = 1",


Other Threads

1. Custom View changing size

How can I reset the size of a View after its onMeasure() is called and
the container has been drawn?


2. Wifi getScanResults() on Emulator

Hi All, is there a solution for getting getScanResults() work on the
emulator . All i want is to read the access point that is been set on
the phone. If not possible to read the actual values i can hard code
the values that are to be returned by getScanResults. Kindly let me if
you have the solution . Thanks


3. Market comments disappearing over last few days

4. Save SMS in outbox

5. Record Voice Message & Send it via Email

6. Issues in changing custom title bar

7. How to Get Rid of Intermediary Page in Searchable Dictionary-Like App