firebase / firebase/firebase-android-sdk
Crashlytics: Impossible to set custom appIdentifiers instead of using app package name
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 34
Description
Fabric Crashlytics had a way of setting `appIdentifier` for your builds that doesn't necessarily need to follow the package name. Documentation [here](https://firebase.google.com/docs/reference/android/io/fabric/sdk/android/fabric/Fabric.Builder#public-fabric.builder-appidentifier-string-appidentifier)
Example:
```
final Fabric.Builder builder = new Fabric.Builder(this);
if (isAlpha) {
builder.appIdentifier("com.example.alpha");
} else if (isBeta) {
builder.appIdentifier("com.example.beta");
} else if (isCI) {
builder.appIdentifier("com.example.ci");
} else {
builder.appIdentifier("com.example");
}
```
The current `firebase-crashlytics` sdk doesn't allow this type of configuration and it hardcodes the `appIdentifier` to use the package name, which is not always the case.
In our current implementation we have different `appIdentifier` based on different open/closed tracks in Play Store for alpha/beta users as well as CI builds, and all share the same package name that is not possible to modify at this point.
If we continue with the migration from `Fabric` sdk to `Firebase` sdk we will start receiving all the crash reports for all of our configurations under the same project, making unviable filtering and identifying crashes/regressions per build in a proper manner.
### [REQUIRED] Step 2: Describe your environment
* Android Studio version: 4.0
* Firebase Component: Crashlytics
* Component version: 17.1.0
### [REQUIRED] Step 3: Describe the problem
#### Steps to reproduce:
Follow migration guide https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android
There is no option to migrate custom `appIdentifier` to the new SDK.
[Source code](https://github.com/firebase/firebase-android-sdk/blob/master/firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/FirebaseCrashlytics.java#L68) shows `appIdentifier` is hardcoded to use package name, making impossible to identify different app types of the same package name
Contributor guide
Research direction
Start with firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/FirebaseCrashlytics.java at the referenced appIdentifier handling, then review the Crashlytics SDK migration guide and the linked Fabric.Builder documentation. The work is complete when migrated Android builds can retain distinct custom app identifiers and their crash reports remain distinguishable across configurations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100