Randomly closing app - InputManagerService: Got RemoteException sending setActive(false) notification
I've a very simple Android app, similar to fingerpaint application. I'm drawing some lines on the screen with my finger.
My problem is that, app closes itself randomly, taking me back to Android home screen.
Only log I can see on LogCat is that line:
(Warning) Tag: InputManagerService: Got RemoteException sending setActive(false) notification to pid 4962 uid 10077.
No exception is thrown.
I've tried compiling project against Android 2.0, 2.1 and 2.2...
I've tried disabling debuggable attribute in manifes开发者_如何学编程t.
I'm having this problem on both Nexus One and 2.2 Emulator.
My problem was drawing on Canvas object from 2 different threads.
I was playing around Android's FingerPaint.java SDK sample and it's accessing Canvas within onTouchEvent. However I was also using SurfaceView and drawing on Canvas within my animation thread.
Therefore removing Canvas object access from onTouchEvent(main app thread) solved my problem.
Thanks.
精彩评论