saravanarajan / acra

Automatically exported from code.google.com/p/acra
0 stars 0 forks source link

Consider adding @Inherited to ReportsCrashes so parent Application class can define parameters #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an abstract BaseApplication class with the ACRA annotation.
2. Create a MyApplication class that is the Android app's application class and 
have it extend BaseApplication
3. Put Acra.init() in either MyApplication or BaseApplication's onCreate()
4. Start the app and notice that ACRA is not initialized.

What version of the product are you using? On what operating system?
4.2.3

Please provide any additional information below.
The goal is to have a base class that others at our organization can use to 
have a common ACRA configuration.

However, since ReportCrashes does not include @Inherited, subclasses like 
MyApplication are not able to expost those annotations give 
getClass().getAnnotation()

Example of @Inherited
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface CustomAnnotation{
String value();
}

Note: I'm also requesting non-Annotation means of configuring ACRA in another 
issue, which would solve my particular problem also.

Original issue reported on code.google.com by red...@gmail.com on 22 Jul 2011 at 1:07

GoogleCodeExporter commented 9 years ago
Regarding my last note about "another issue", assuming the @Inherited change 
goes in, it looks like we can use the ErrorReporter instance to allow apps to 
modify the configuration after the initial parent initialization, which meets 
our needs.

Original comment by red...@gmail.com on 22 Jul 2011 at 1:27

GoogleCodeExporter commented 9 years ago
The Inherited meta annotation has been added to the trunk version.
Non-annotation configuration methods have also been added in previous commits.

Original comment by kevin.gaudin on 2 Jan 2012 at 9:34

GoogleCodeExporter commented 9 years ago

Original comment by kevin.gaudin on 7 Sep 2012 at 9:31