问题
I am building a cross-platform mobile app in HTML, CSS & Javascript and publishing it to Android and iOS using PhoneGap as a wrapper.
I have published in the Android Market, and am finding out through customer reviews that the app stalls early during the user setup phase, with some users/devices. I do not have any kind of error handling and reporting set up in the app, and the Android Market's crash report is still giving me 0 crashes after hundreds of downloads and half a dozen disappointed reviews.
I haven't thought about error reporting while building the app. Now that it exists, is there a simple way to implement it? I'm currently trying to intercept the window.onError event, but is that the right approach?
I've read about Acra http://code.google.com/p/acra/ but this seems to be Java error reporting. If Javascript fails on a missing function or non-existing object, will Acra report the details of that?
EDIT: Since my app has internet access anyway, I implemented a listener for the javascript 'onerror' event, which provides a description of the error.
This listener uses Cordova/PhoneGap to detect if there is a connection: if there is, it sends the error description to the server along with the device. If there isn't, it attaches an event listener to Cordova/PhoneGap's 'online' event to send the error when the device goes online.
It's not running perfectly yet (which is why I'm not adding this as an official answer)
回答1:
No, and believe me, it's a bad thing for a huge amount of us!
来源:https://stackoverflow.com/questions/9971718/what-is-causing-my-web-app-to-stall-on-some-android-devices-how-do-i-detect