diff --git a/samples/afero-lab/app/src/main/java/io/afero/aferolab/MainActivity.java b/samples/afero-lab/app/src/main/java/io/afero/aferolab/MainActivity.java index 040f427..0711a52 100644 --- a/samples/afero-lab/app/src/main/java/io/afero/aferolab/MainActivity.java +++ b/samples/afero-lab/app/src/main/java/io/afero/aferolab/MainActivity.java @@ -230,9 +230,17 @@ public void call(ConclaveClient.Status status) { }); mAferoSofthub = AferoSofthub.acquireInstance(this, mAferoClient, "appId: " + BuildConfig.APPLICATION_ID); - mAferoSofthub.setService(BuildConfig.AFERO_SOFTHUB_SERVICE); - mAferoSofthub.setHost(BuildConfig.AFERO_SERVICE_HOSTNAME); - mAferoSofthub.setHost(BuildConfig.AFERO_SOFTHUB_AUTHENTICATOR_CERT); + if (BuildConfig.AFERO_SOFTHUB_SERVICE != null) { + mAferoSofthub.setService(BuildConfig.AFERO_SOFTHUB_SERVICE); + } + + if (BuildConfig.AFERO_SERVICE_HOSTNAME != null) { + mAferoSofthub.setHost(BuildConfig.AFERO_SERVICE_HOSTNAME); + } + + if (BuildConfig.AFERO_SOFTHUB_AUTHENTICATOR_CERT != null) { + mAferoSofthub.setAuthCert(BuildConfig.AFERO_SOFTHUB_AUTHENTICATOR_CERT); + } mAferoSofthub.observeSetupModeDevices() .observeOn(AndroidSchedulers.mainThread())