ConfigurationCollector

Inspects a Configuration object through reflection API in order to generate a human readable String with values replaced with their constants names. The Configuration.toString method was not enough as values like 0, 1, 2 or 3 aren't readable. Using reflection API allows to retrieve hidden fields and can make us hope to be compatible with all Android API levels, even those which are not published yet.

Author

Kevin Gaudin & F43nd1r

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun collect(context: Context, config: CoreConfiguration, reportBuilder: ReportBuilder, crashReportData: CrashReportData)

Calls .shouldCollect for each ReportField and then .collect if it returned true

open override fun collect(reportField: ReportField, context: Context, config: CoreConfiguration, reportBuilder: ReportBuilder, target: CrashReportData)

Collect a ReportField

Link copied to clipboard
open override fun collectApplicationStartUp(context: Context, config: CoreConfiguration)

collect startup data

Link copied to clipboard
open fun enabled(config: CoreConfiguration): Boolean

controls if this instance is active

Link copied to clipboard
fun shouldCollect(context: Context, config: CoreConfiguration, collect: ReportField, reportBuilder: ReportBuilder): Boolean

this should check if the config contains the field, but may add additional checks like permissions etc.