Problem with Quick Search Box: ContentProvider with a custom non-sqlite datasource

by Charlie Chilton » Sat, 03 Jul 2010 15:42:07 GMT

Sponsored Links

I've been trying to implement a quick search feature to my app
Thinking Space this weekend without much success..

I've created a searchable.xml, modified the app's manifest, and
created a 'dummy' content provider. My app doesn't use SQLite for
data, as the searchable objects are MindMaps that are stored in XML
files on the SDCard, so my trouble is with trying to get the Quick
Search system to use my dummy content provider.

My initial goal is just to have the opened map searchable, with the
user's search queries being performed in code against the Java object
model of the currently opened MindMap.

The problem is, that when the using the Quick Search Box, I can see
the search query string arrive at my dummy content provider's query()
method, but the main Activity doesn't get it's onCreate() called with
a search intent; I suspect that this is because the dummy
contentprovider returns Null for the cursor in the query() method, and
then the SearchManager assumes there are no results to bother the
activity with.

Has anyone else had success in utilising the Quick Search
Functionality with non-SQLite datastores? Or should I abandon trying
to use the Quick Search functionality like this, and implement my own
method of doing it?

Any help appreciated!




Other Threads

1. Issue with Catch Handler


I have recently hit a snag using the Android plugin to Eclipse. For
some reason, ALL of my errors being thrown don't initialize and show
me the error. Has anyone ever seen this issue before and if so, what
did you do to correct it?

In particular, I am seeing it when I try to invoke the HTTPGet in a
HTTPClient object. If I have no connectivity, then I should get an
error. The Catch block does fire when this occurs...however, when I
check my general Exception object, the object is NULL (NULL Pointer).
Why would this happen if the catch is grabbing the exception?

My exceptions used to be working....and I was able to see the stack
trace. However, I can no longer see any stack trace regardless of the
Exception class I am using. Can someone please help me understand what
the heck is wrong with Eclipse, Android, or both? Is there something I
am missing on the configuration side? this a bug?

Mind you, I have already used Stack Overflow for this question. It has
been viewed 40 times but no answer yet. I hope anybody on here can
help me understand why this is occurring.

Thanks in advance,



2. Images from drawable-nodpi getting scale

I recently rebuilt my project to target 2.2 from 2.1.

In the old project, I did not specify a target SDK (the manifest did
not contain something like: <uses-sdk android:minSdkVersion="8" />).
This gave me an error in the console when running, but everything
worked fine so I didn't fool with it.

The new project now uses <uses-sdk android:minSdkVersion="8" /> in the

But now my drawables from the /drawable-nodpi/ folder are loading with
scaling, making them much smaller and significantly changing the
desired visuals.

If I cut out the <uses-sdk android:minSdkVersion="8" /> tag from my
manifest, they load properly without scaling.

Even when loading my images like so:

                BitmapFactory.Options opts = new
                opts.inScaled = false;
                Bitmap bm = BitmapFactory.decodeResource(_resources,
resId, opts);

They are still scaled when I declare the minimum SDK in the manifest,
but not scaled if I remove that tag.

Why is this happening? How can I load them without scaling while still
declaring the minimum SDK?


3. How to start a background service on install

4. How to use system () call

5. Keyboard log for reference

6. how to fill the irregular shape with the red color?

7. Sms that Allow Permission