Closed consp1racy closed 6 years ago
Where are we supposed to include that snippet? in the XpPreferenceFragment (during onCreatePreferences2()) or in our Application.java class? Btw, thanks for the amazing library.
@javmarina Hello, in Application.onCreate. Do it only once when the app starts, otherwise it would pollute your logs. I'll update the readme.
That's what I was thinking. Makes sense, at least if the user opens the settings screen multiple times
You're right! It makes no sense to eagerly do it on app start. That's a good point.
You can do it in settings activity but put it behind a static boolean (single initialization) and make sure you don't leak activity context (error interceptor is static nested class and gets an application context as parameter).
Introduce a new API in the library to report internal errors to client supplied processor, such as Crashlytics. Client can then request support here, in Issues.
This is indented to mend device specific errors.
RingtonePreference
can benefit the most, I think.Clients can implement like so:
Only register the listener once per app process!