Similar to this question, how can I have two app entries in Crashlytics - one that reports production issues and another for regression testing or even beta testing issues?
Asked
Active
Viewed 1,602 times
2 Answers
6
You can specify different version strings for different versions of your app, and Crashlytics will track them seperately.
For the production version,
Crashlytics.setString("version", "Production");
For your testing version,
Crashlytics.setString("version", "Testing");
Similarly, you can have as many versions as you want.
And then, on the top left corner of your Crashlytics dashboard, you can click on the dropdown to select the version you want to view.

Swayam
- 16,294
- 14
- 64
- 102
-
where do you set this? Application level? – portfoliobuilder Jul 23 '15 at 18:28
-
1Yes, the place where you are initialising Crashlytics. – Swayam Jul 24 '15 at 06:27
0
You can simply change your package name like this https://stackoverflow.com/a/27677033/8769539 or you can add environment.gradle in your app and add this code
ext.ENV_PROD = '"PROD"'
ext.ENV_DEV = '"DEV"'
ext.PACKAGE_DEV = 'your dev package name'
ext.PACKAGE_PROD = 'your prod package name'
ext.ENV = ENV_PROD // modify
ext.PACKAGE = PACKAGE_PROD // modify
def propsFile = rootProject.file('urls.properties')
if (propsFile.exists()) {
def props = new Properties()
props.load(new FileInputStream(propsFile))
if (ENV.equals(ENV_PROD)) {
PACKAGE = PACKAGE_PROD
}
}
then apply it to build.gradle like this
`apply from: 'environment.gradle`