Conversation
|
Interesting that we got two PR the same day for that issue, refs #3167, is it a recent regression? |
I have to check this version. I will know you. But Mine one #3167 is working fine I have tested on Android 14 . No crash on_pause on_reaume of java thread on Android |
| self.handlerthread.start() | ||
|
|
||
| if self._is_registered: | ||
| print("[BroadcastReceiver] Already registered.") |
There was a problem hiding this comment.
Would be better with a logger instead of print.
| self.context.unregisterReceiver(self.receiver) | ||
| self._is_registered = False | ||
| except Exception as e: | ||
| print("[BroadcastReceiver] unregisterReceiver failed:", e) |
There was a problem hiding this comment.
Would be better with a logger instead of print.
| Handler = autoclass('android.os.Handler') | ||
|
|
||
| if hasattr(self, 'handlerthread') and self.handlerthread.isAlive(): | ||
| print("HandlerThread already running, skipping start") |
There was a problem hiding this comment.
Would be better with a logger instead of print.
logger = logging.getLogger("BroadcastReceiver")
logger.setLevel(logging.DEBUG)This. |
Can you update the PR with these changes? |
Yepp. |
* Update broadcastReceiver * Undo unnecessary changes. * Update broadcast.py
Fix BroadcastReceiver
jnius.jnius.JavaException: JVM exception occurred: java.lang.IllegalThreadStateExceptionduring runtime.