MindorksOpenSource / CrashReporter

CrashReporter is a handy tool to capture app crashes and save them in a file.
Apache License 2.0
403 stars 94 forks source link

Is there any no-op implementation already? #15

Open mochadwi opened 4 years ago

mochadwi commented 4 years ago

Does this library wouldn't be crashed if we only define the debugImplementation? The initialization class will be red in releaseImplementation

mochadwi commented 4 years ago

cc @amitshekhariitbhu @balsikandar @janishar

vijai1996 commented 4 years ago

I have been making quite some changes to a fork of this library here as a part of it, thanks to your issue, I implemented no-op.

Please note, the readme is still to be updated and maybe a wiki in future. But, you can use

'com.orpheusdroid.crashreporter:crashreporter:1.0.3' for full implementation and 'com.orpheusdroid.crashreporter:crashreporter-no-op:1.0.3' for the no-op implementation.

Further, while using no-op make sure you wrap CrashReporterActivity with BuildConfig.debug condition if you are using it. Since the no-op version's CrashReporterActivity is an empty class while the actual one is an activity.

Refer to this example if still not clear.

mochadwi commented 4 years ago

will leave this issue open for future reader

mochadwi commented 4 years ago

I have been making quite some changes to a fork of this library here as a part of it, thanks to your issue, I implemented no-op.

Please note, the readme is still to be updated and maybe a wiki in future. But, you can use

'com.orpheusdroid.crashreporter:crashreporter:1.0.3' for full implementation and 'com.orpheusdroid.crashreporter:crashreporter-no-op:1.0.3' for the no-op implementation.

Further, while using no-op make sure you wrap CrashReporterActivity with BuildConfig.debug condition if you are using it. Since the no-op version's CrashReporterActivity is an empty class while the actual one is an activity.

Refer to this example if still not clear.

thank you so much @vijai1996