Last active
August 19, 2022 10:11
-
-
Save yveskalume/ed232027430614fb66470b913ff95c5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class App : Application() { | |
override fun onCreate() { | |
super.onCreate() | |
val devOptions = FirebaseOptions.Builder() | |
.setProjectId("beserved-development-project") | |
.setApplicationId("1:212877806437:android:fee5f52927e2f7a907ed8c") | |
.setApiKey("AIzaSyADUe90ULnQDuGShD9W23RDP0xmeDc6Mvw") | |
.build() | |
val prodOptions = FirebaseOptions.Builder() | |
.setProjectId("beserved-production-project") | |
.setApplicationId("1:27992087142:android:ce3b6448250083d1") | |
.setApiKey("BIzaSyADUe90ULnQDuGShD9W23RDP0xmeDc6Mvw") | |
.build() | |
// here we check wich instance to use depending on the build type | |
if(BuildConfig.DEBUG) { | |
FirebaseApp.initializeApp(this, devOptions, "beserved-development") | |
} else { | |
FirebaseApp.initializeApp(this, prodOptions, "beserved-production") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment