3 ms·
Wow. I didn't know that the Android SDK shipped with such advanced profiling tools. They have really improved since the last time I played with it, circa 1.x. I
by elteto 14y ago
Wow. I didn't know that the Android SDK shipped with such advanced profiling tools. They have really improved since the last time I played with it, circa 1.x. Impressive. Can anyone comment on other similar tools?
- martythemaniak 14y agoAnother common one is "strict mode", where you tell Android to notify you (via screen flash or log dump) any time your app makes a potentially blocking call (network, file system) on the UI thread. Very useful as a first optimization.
- ConstantineXVI 14y agoAs of (IIRC) Gingerbread, you get thrown a NetworkOnMainThreadException if you're making network calls in the UI thread and haven't explicitly turned StrictMode off. (The WinRT SDK goes a step further, there simply _aren't_ any blocking network/FS methods available. async/await makes that less painful than it would seem, though.)
- ConstantineXVI 14y agoPS: It's actually Honeycomb and later. This behavior only kicks in if you're compiling against HC+, anything compiled against GB or lower can freely block the UI thread with reckless abandon regardless of which Android version you're running on.