What is causing my web app to stall on some Android devices? How do I detect?

半城伤御伤魂 提交于 2019-12-13 18:26:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!