Currently, I am in the process of developing a mobile application that is cross-platform and built using HTML, CSS & JavaScript. My plan is to publish this app on both Android and iOS by utilizing PhoneGap as a wrapper.
After successfully launching the app on the Android Market, I have encountered feedback from users indicating that there are issues with the app stalling during the initial setup phase for certain users and devices. Unfortunately, I did not incorporate any error handling or reporting mechanisms within the app itself. Even after multiple downloads and negative reviews, the crash report in the Android Market shows no reported crashes.
In hindsight, I realize the importance of including error reporting functionalities while developing the app. Is there a straightforward way to integrate this now? Currently, my approach involves trying to capture the window onError event, but I am unsure if this is the most effective method.
I have come across Acra (http://code.google.com/p/acra/), which seems to provide Java error reporting. However, my concern lies with whether it can also report details when JavaScript errors occur due to missing functions or non-existing objects.
EDIT: Given that my app already has internet access, I have implemented a listener for the 'onerror' event in JavaScript, which provides information about the error. This listener utilizes Cordova/PhoneGap to check for an active connection: if present, it sends the error description along with device details to the server. In cases where there is no internet connectivity, it attaches an event listener to Cordova/PhoneGap's 'online' event to transmit the error once the device regains online status.
While this solution is still a work in progress and not yet flawless, I believe it is a step in the right direction towards addressing these issues effectively.