How to update View object on main thread by background thread

by Anh Khoa Nguyen Pham » Wed, 04 Mar 2009 15:56:06 GMT


Sponsored Links
 serTask class is useful but in this case, if i want to fix my problem in my
code, can you help me to do that?
I really appreciate your help !
Thanks,
NPAK

On Wed, Mar 4, 2009 at 2:15 PM, Clay <claytan...@gmail.com> wrote:


--~--~---------~--~----~------------~-------~--~----~



How to update View object on main thread by background thread

by Anh Khoa Nguyen Pham » Thu, 05 Mar 2009 12:00:31 GMT


 i Clay,

Thank for your help so much,
Now, i can fix my problem.I insist to find way to fix my problem in my code
because it will makes my skill better than using someone's code. But next
time, i will use UserTask to do that.

Best regard,
NPAK

On Thu, Mar 5, 2009 at 9:54 AM, Clay <claytan...@gmail.com> wrote:


--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to update View object on main thread by background thread

by Anh Khoa Nguyen Pham » Thu, 05 Mar 2009 12:05:58 GMT


 i Clay,

Thank for your help so much,
Now, i can fix my problem.I insist to find way to fix my problem in my code
because it will makes my skill better than using someone's code. But next
time, i will use UserTask to do that.

Best regard,
NPAK

On Thu, Mar 5, 2009 at 9:54 AM, Clay <claytan...@gmail.com> wrote:


--~--~---------~--~----~------------~-------~--~----~



How to update View object on main thread by background thread

by Dianne Hackborn » Thu, 05 Mar 2009 13:10:51 GMT


 o just do something every so often, you really shouldn't use a thread (or
UserTask), just Handler.sendDelayedMessage(), which is a lot lighter-weight.

On Wed, Mar 4, 2009 at 8:05 PM, Anh Khoa Nguyen Pham <npak...@gmail.com>wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support. All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Problems with Bluetooth and sound out

Hello,

I have my G1 connected to a FM transmitter in my car with my bluetooth
headset connected. Music has no problem going out the G1.  A call
comes in and I connect it.  After I disconnect the call, the sound
does not go out the adapter on the G1, but out the phone's speaker.
Is there any setting to make sure the sound goes out the bottom
adapter and not the phone's speaker?

Thanks,
Marc

--~--~---------~--~----~------------~-------~--~----~

2. dalvik doesnt seem to recognize classes compiled with groovyc

Ive been trying to get groovy running on dalvikvm. And i have been
trying the route via groovyc (groovyc -> jar -> dx -> dalvikvm).
For testing i put together a jarfile with 3 classfiles, one pure java,
one javaclass that invokes a method on a groovy class, and a groovy
class.

The pure java class works flawlessly but the other two fails with
these messages:

/system/bin/dalvikvm -classpath testdex.jar GroovyFromJ
Dalvik VM unable to find static main(String[]) in 'GroovyFromJ'
java.lang.VerifyError: GroovyFromJ
        at dalvik.system.NativeStart.main(Native Method)

And for the groovy file:
/system/bin/dalvikvm -classpath testdex.jar Groov
Dalvik VM unable to locate class 'Groov'
java.lang.NoClassDefFoundError: Groov
        at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Groov in loader
dalvik.system.pathclassloa...@400190d8
        at dalvik.system.PathClassLoader.findClass
(PathClassLoader.java:243)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
        ... 1 more

What should happen is that the classes invoking groovy should throw a
class not found exception since i don't have the groovy jar in the
classpath yet (theres no point atm).
Does anyone have a clue about whats going on here? I know the
classfiles generated by groovyc is slightly different from javas, but
they are "real" classfiles and should atleast load.



--~--~---------~--~----~------------~-------~--~----~

3. Telephony Manager functions don't work

4. Disabled EditText accepts input from soft keyboard

5. Differences between configuration of G1 and HTC Magic

6. How to log messages sent using SMS service?

7. Sending SMS more than 160 characters