Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Override android package name for Crashlytics reporting

In the Amazon AppStore you can distribute both Google Play-style apps and apps heavily customized for the Fire Phone and Fire TV. In order to do this, you generate two different binaries (which can really be quite different and should be thought of as two different apps entirely).

Once the binaries have been created, you need to distribute them to the proper devices via the Amazon AppStore. This is where the problem comes in - since all binaries need to have the same package name.

What is the preferred method to track two different apps which have the same package name using Crashlytics?

I have tried setting a custom package name using the directions found here for reporting a different package to Crashlytics - however the custom package name never appeared in Crashlytics even after forcing several crashes and observing the SDK upload the reports.

like image 388
Matthew Runo Avatar asked Aug 01 '14 22:08

Matthew Runo


1 Answers

With the new Fabric's Crashlytics, you can directly configure a package name to use in the Fabric.Builder factory, if not set it defaults to context.getPackageName().

Fabric.with(new Fabric.Builder(context).kits(new Crashlytics()).appIdentifier("com.stuff.overriden").build());
like image 59
Jiboo Avatar answered Sep 19 '22 05:09

Jiboo