Saturday, 14 July 2018

Android Crashlytics - restrict network access

I've been working for a while around a lack of ability to restrict Crashlytics network usage under certain conditions. For example - on roaming , on metered networks and so on..

According to SDK documentation , only two options I found addressing somehow this:

  • "Opt Out" on runtime by simply not initialize Crashlytics

  • built in User consent dialog before sending crash report

This API's are very limited, because:

  • Not initialize Crashlytics not only prevents network access, but also prevents any chance Crashlytics will save locally the crash report, so that eventually the event will be sent. Not to mention there is no good way to opt out in runtime, besides overriding brutally the Thread.setUncaughtExceptionHandler

  • consent dialog not making any sense to user if crash happens in background.

My question basically: Am I missing something? Is there any way to restrict Crashlytics network access?

My motivation comes from a need to prevent situation my app uses network bandwidth potentially can cost money to the user under certain conditions, although "cellular network" or "use data over roaming" device settings are enabled.



from Android Crashlytics - restrict network access

No comments:

Post a Comment