our mobile-java project is in big trouble!
(we're using nokia 6630 - CLDC 1.1, MIDP 2.0 -
mobile phones for development).
from time to time a video is supposed to be shown
to the user using the mobile media api (mmapi jsr-135)
in the main thread.
there's a thread (bt-thread, not the main thread!) that
scans for bluetooth devices in an endless-loop in
the run()-method. the whole bluetooth-handling is
done in this thread.
that works fine.
if the bt-thread isn't stopped, it is not possible
to play the video.
pause the bt-thread (a call to wait() -> iSouldPause=true <- in
the endless loop - not breaking out of run()-method()!).
-> no video is shown
stop the bt-thread (break out of the endless loop and
quit the run()-method).
-> video is shown, but the bt-thread cannot be started again
-> cancel all inquiries and service searches and
destroy the old bt-thread(btThread = null
-> create a new bt-thread and start it (newBtThread.start()
-> problem: BluetoothStateException - discovery agent still busy,
a new device inquiry cannot be executed
is there anybody who has gathered experience with the
combination of bluetooth-device-disvovery and the
use of video using mmapi?
thank you for devoting yourself to our problem.
bauhaus-university, weimar, germany