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

by yves...@gmail.com » 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 yves...@gmail.com » 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

Hi,

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
file:

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

The generated file MyServiceInterface.java, contains numerous errors.
Among them is "testapp.test.net 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?

Anders

-- 

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

res/drawable-hdpi/image.png
res/drawable-mdpi/image.png
res/drawable-ldpi/image.png

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