I am developing a crash reporter plugin for phonegap android apps. For the testing purpose, I have to make my application crash & "Unfortunately, application has stopped" window has to be invoked. When I make an unhandled exception in the javascript, the app is not crashing. Instead its showing the same screen. I made the app screen stop respond to user input by executing some infinite loop in javascript & waited around 1 hour, still the app was not crashing. Is the phonegap library by default handling the exceptions ? how I can make my app crash by making exception in javascript level ?
I tried the below code,added a java method to generate crash in the 'CordovaActivity' class.
public static void generateCrash()
{
int a = 0;
int b = 10;
int c = b/a ;
}
The app is crashing when I call this method from java (from the 'onCreate' in the activity class) . But when I invoke the same method from the javascript using plugin, the app is not crashing. I want my app to crash by calling/invoking some function from the javascript.