getContentResolver.query(Images.Media.EXTERNAL_CONTENT_URI ...) returns null on device

by » Mon, 13 Apr 2009 08:24:32 GMT

Sponsored Links
 This code works fine with the emulator, I can get a cursor to all the
images, but after I installed the app into the real device (G1), I ran
the app, this call returns null. If I change from EXTERNAL_CONTENT_URI
to INTERNAL_CONTENT_URI, at least it returns not null cursor and the
count is 0.

Anything I should do to get this to work?

getContentResolver.query(Images.Media.EXTERNAL_CONTENT_URI ...) returns null on device

by » Mon, 13 Apr 2009 11:57:34 GMT

 Yes. But I figured it out. If I mount the device after plugged in
through USB, it won't be able to query. After I disconnect and then
reconnect the phone without mount the drive, i can get this to work.


Sponsored Links

Other Threads

1. Can not create service interface


For some reason I can not create an AIDL service interface, no matter
how simple it is. I am using the latest version of eclipse.

This is what I get, no matter what service functions I add to the aidl

The method attachInterface(IInterface, String) in the type Binder is
not applicable for the arguments (MyServiceInterface.Stub, String)

The generated file, contains numerous errors.
Among them is " cannot be resolved to a type". Very
strange, since eclipse can do this for everything else.

I have other projects in my workspace where I use AIDL successfully,
but now I can not add this to any project. Very strange. If remove the
aidl file, I can compile and run the app without any problem.

Anyone that have any idea what is going on here?



2. drawable-hdpi not appearing in eclipse emulator

Hi there,

So I have this game running on Android 1.6, and I put the different
density images in their respective folders


I made each image a different color so I can tell if it is loading the
right image. When I test my program on different density screens it
only chooses the mdpi images. It scales them to match the correct dpi
but doesn't choose the right folder. It just defaults to mdpi.

In the manifest I have,
android:normalScreens="true" android:anyDensity="false"

Anyone have a similar problem? I'm sure it is something simple that I
am overlooking but I can't figure it out. From what I read on the
Android Support Multiple Screens guide is that you should just have to
put the different density images in their correct folders and Android
will do the rest.


3. Activity based Tabs

4. Cannot make phone calls between emulator instances compiled from source

5. Power-loss semantics of SQlite on Android

6. Problem installing your own developed app

7. Changing the battery icon position