ConfigurationCollector

@AutoService(value = [Collector::class])
class ConfigurationCollector : BaseReportFieldCollector, ApplicationStartupCollector

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

ConfigurationCollector
Link copied to clipboard
fun ConfigurationCollector()

Types

Companion
Link copied to clipboard
object Companion
Prefix
Link copied to clipboard
enum Prefix : Enum<ConfigurationCollector.Prefix>

Functions

collect
Link copied to clipboard
open override fun collect(context: Context, config: CoreConfiguration, reportBuilder: ReportBuilder, crashReportData: CrashReportData)
Calls .
open override fun collect(reportField: ReportField, context: Context, config: CoreConfiguration, reportBuilder: ReportBuilder, target: CrashReportData)
Collect a ReportField
collectApplicationStartUp
Link copied to clipboard
open override fun collectApplicationStartUp(context: Context, config: CoreConfiguration)
collect startup data
enabled
Link copied to clipboard
open fun enabled(config: CoreConfiguration): Boolean
controls if this instance is active
shouldCollect
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.

Properties

order
Link copied to clipboard
open val order: Collector.Order