Prashant Jajal
Prashant Jajal

Reputation: 3627

Need to integrate crashlytics in SDK made by us. how can i?

I want to identify the crashes in my SDK when some other apps integrate my SDK in their app.. during the use of my SDK in other apps, if crashes happen anywhere in my SDK code, then I want to identify that.

What are the ways to implement this type of integration in SDK?

Upvotes: 2

Views: 154

Answers (1)

Shlomi Katriel
Shlomi Katriel

Reputation: 2403

To integrate Crashlytics you need to configure Firebase for your app package.

Since the app package is not your app package, but the package of the consumer of your SDK, it's impossible.

I believe there is an alternative way of doing so (check out Thread.setDefaultUncaughtExceptionHandler(...) and wrap the existing one), but I recommend, as been said in the comments, to check how you can legally do it.

I'm guessing (pure guess so don't take my word for it) that you need a written consent from you SDK customer and also runtime consent from the end user.

That being said - I strongly recommend not to do it.

Alternative legal way to do it:

  • Create an exception class, dedicated for your SDK. For example, if your SDK is called "My SDK" so create MySdkException.
  • Only throw MySdkException from within your SDK.
  • Embed libraries within your SDK and wrap their exceptions with MySdkException.
  • Don't obfuscate MySdkException.
  • The most important - kindly ask your SDK consumer to report any crashes caused by MySdkException.
  • Verify that your SDK customer asks the end-user to agree Crash report.

Upvotes: 2

Related Questions