To the Devs: Crash report / debug build questions

To the Devs: Crash report / debug build questions

When the app encounters an unhandled java exception or some other java error, the app will crash.
In this case only the objective-c stack trace and backtrace info is reported to Apple and not the corresponding java part.

My current solution is to use "Thread.setDefaultUncaughtExceptionHandler" and send the info to my server via a http request. But this isn't an optimal solution, because there could be no internet connection in this moment.

My questions:

1) Thread.getDefaultUncaughtExceptionHandler() returns NULL, so I'm unable to call the original exception handler (and therefore no backtrace is written to the console automatically). Why is it returning NULL?

2) Is there a better (or standard) way to send the crash report? Saving the file and sending it later will create some overhead in the app and make things complicated.

3) How can I tell if I'm currently running a debug build or release build? (this is really important, because e.g. I don't want to output debug messages in a release build)

4) Is there an easy way to enable the proguard obfuscater in a release build only? (I don't want my debug build to be obfuscated!)

Thanks in advance!


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.