No issue: Add logging for firebase/autopush

nightly-build-test
Jonathan Almeida 5 years ago committed by Jonathan Almeida
parent 58287cd5bb
commit ccd9e44a3e

@ -192,6 +192,8 @@ open class FenixApplication : Application() {
// We need the push feature setup here to deliver messages in the case where the service
// starts up the app first.
if (components.backgroundServices.pushConfig != null) {
Logger.info("Push configuration found; initializing autopush..")
val push = components.backgroundServices.push
// Install the AutoPush singleton to receive messages.

@ -83,11 +83,15 @@ class BackgroundServices(
}
val pushConfig by lazy {
val logger = Logger("PushConfig")
val projectIdKey = context.getString(R.string.pref_key_push_project_id)
val resId = context.resources.getIdentifier(projectIdKey, "string", context.packageName)
if (resId == 0) {
logger.warn("No firebase configuration found; cannot support push service.")
return@lazy null
}
logger.debug("Creating push configuration for autopush.")
val projectId = context.resources.getString(resId)
PushConfig(projectId)
}

Loading…
Cancel
Save