I wrote an Android application using Phonegap. Now I need to use the camera but, since the Phonegap API for camera uses the Camera Intent, it provides me the camera with the native controls of my phone; instead I'd like to implement my own controls. To obtain that, I think I don't have to use the camera intent, instead I should use the long procedure (implement a framelayout, a CameraPreview, etc.), in order to draw my own controls. I can do that in a new application, but in the Phonegap plugin it doesn't work, since everytime I try to run the program, it shows the message "Failed because: Can't create handler inside thread that has not called Looper.prepare()". Any idea? Thanks in advance
Asked
Active
Viewed 1,460 times
1 Answers
1
There are a bunch of SO answers that deal with this threading problem.
Can't create handler inside thread that has not called Looper.prepare()
Can't create handler inside thread which has not called Looper.prepare()

Community
- 1
- 1

Simon MacDonald
- 23,253
- 5
- 58
- 74
-
Hi Simon and thanks for your answer. I had already seen the links you posted, but since I'm a newbie with Android, I wasn't able to solve my issue, that's why I wrote this post. Now after many tests luckily I was able to solve it. Thanks – l3golas Apr 13 '12 at 13:54
-
I used the method runOnUiThread, quite easy... now that I know it ;) It is sufficient to call it and make all the changes to the program graphical interface inside it. – l3golas Apr 24 '12 at 22:31