{ "project_number": "PROJECT_NUMBER", "firebase_url": "FIREBASE_URL", "project_id": "PROJECT_ID", "storage_bucket": "STORAGE_BUCKET" }, "client": [ { "client_info": { "mobilesdk_app_id": "MOBILE_SDK_APP_ID", "android_client_info": { "package_name": "PACKAGE_NAME" } }, "api_key": [ { "current_key": "KEY" } ], "services": { "analytics_service": { "status": 1 } } } ], "configuration_version": "CONFIGURATION_VERSION" } <string name="google_api_key">API_KEY</string> <string name="google_app_id">APPLICATION_ID</string> <string name="google_storage_bucket">STORAGE_BUCKET</string> <string name="firebase_database_url">FIREBASE_URL</string> <string name="project_id">PROJECT_ID</string> try { FirebaseApp.initializeApp(context, FirebaseOptions.Builder() .setApiKey("API_KEY") .setApplicationId("APPLICATION_ID") .build(), "PACKAGE_NAME") } catch (e: IllegalStateException) { // fallback code }