raw resources in worker thread

by Bob » Fri, 13 Mar 2009 13:35:45 GMT

Sponsored Links
How do I access raw resources in a worker thread?   I have been trying
to use Context.getResources but this seems to create some type of
handler error.


Other Threads

1. AutocompleteTextView with cursor

How to use AutoCompleteTextWiew  with a cursor ?

I tried for instance for the cursor addr

        contact.setAdapter(new SimpleCursorAdapter
                        new String[]
{Contacts.ContactMethods.NAME},new int[]

but all my contacts names are played

If somebody knows how to resolve this kind of problem It will be


2. Performance of local variable vs. class field

In the Notepad Exercise 2, there is a section about perf (see excerpt)

*Note:* We assign the mNotesCursor field to a local variable at the start of
the method. This is done as an optimization of the Android code. Accessing a
local variable is much more efficient than accessing a field in the Dalvik
VM, so by doing this we make only one access to the field, and five accesses
to the local variable, making the routine much more efficient. It is
recommended that you use this optimization when possible.

Can someone tell me in a bit more precise terms how "much more efficient" is
to use a local variable? I'm trying to weigh the perf benefit vs. code
readability/maintainability. It is a pain to reassign n fields to n local
variables for m methods...




3. Code coverage testing Android

4. Get the screen resolution

5. What happens to the database when app is "upgraded"

6. opencore RTSP redirection support or not

7. AlertDialogs reused ?