android - How to know that java method is blocking a current thread -
how know, method i'm using blocking thread or running it's own thread? there sign in api? example android- method scanning ble devices: http://developer.android.com/reference/android/bluetooth/bluetoothadapter.html#startlescan%28android.bluetooth.bluetoothadapter.lescancallback%29 running (scanning) until stop manually. how can know if should call method in thread, not block user's interaction possibility?
a few ways-
logcat tell if ui hanging due work on ui thread.
also, there strict mode can enable on develop builds https://developer.android.com/reference/android/os/strictmode.html
bottom line, if ui remains responsive , logcat clean don't have problems.
Comments
Post a Comment