If you are using android_native_app_glue.h (see:
{android-ndk-r8b}/docs/NATIVE-ACTIVITY.HTML)
then all your callbacks are on a worker thread (not the main UI thread).
This worker thread does not have a Looper.
On Tuesday, November 6, 2012 1:06:33 AM UTC, Thunk Monkey wrote:
>
> I am calling a Java function using JNI from a NativeActivity thread. This
> function tries to create a Handler, but then gets the following exception:
>
> java.lang.RuntimeException: Can't create handler inside thread that has
> not called Looper.prepare()
>
> Is it possible to create Handlers for the NativeActivity thread?
>
> Thanks!
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en