I'm using Crashlytics for android and it really helped me to fix many of my crashes. But today I had a little problem with it.
When I tried to test crashlytics on 2.3.3 Galaxy S device, which is connected to internet by wi-fi(with proxy), I saw black screen on device for about 2:30 minutes. While debugging; I see that Crashlytics.start(this)
code is not async. It waits to establish a connection and thus onCreate method can not be finished by UI thread.(This explains black screen).
I know this a proxy issue(proxy setting is a bit buggy on 2.3.x devices) but waiting for about 2:30 minutes made my app black screen. This worried me that this may happen on any other real life conditions such as poor internet connection.
I will try to put Crashlytics.start(this)
function into an asynctask and will try this on every activities onCreate method. (AFAIK there is no method to check isCrashlyticsInitialized)
Does anyone have better idea about this?
Thanks in advance.
LOGCAT:
10-02 16:01:38.410: D/Crashlytics(1561): Initializing Crashlytics 0.9.11.11
10-02 16:04:19.664: E/Crashlytics(1561): Network error while loading Crashlytics settings. Crashes will be cached until the network is available.
[URL=https://settings.crashlytics.com/api/v2/keys/KEY/platforms/android/apps/com.myapp/settings.json?libVersion=0.9.11.11&bundleVersion=441210&shortBundleVersion=2.1];[class java.net.SocketTimeoutException: Connection timed out]
Marc from Crashlytics here. Crashlytics.start() does all the heavy lifting in a background thread in newer versions of the SDK. Your logs indicate you're using v0.9.11. Once you update to the latest version (v1.0.4), you'll be fine keeping Crashlytics.start in the Application subclass. Please contact us at support at crashlytics dot com if you need any help updating!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With