Can’t retrieve data from firebase database to show inside my textbox

I tried to get the data from the firebase cloud database, but the data didn’t show out. This is the code I try to retrieve data private fun updateUI(currentUser: FirebaseUser?){ if(currentUser!=null){ fstore.collection(“users”) .document(auth.currentUser!!.uid) .get() .addOnCompleteListener { task-> task.result!!.get(“name”) == name.text.toString(); task.result!!.get(“email”) == email.text.toString(); Toast.makeText(baseContext, “Haha”, Toast.LENGTH_LONG).show() } }else{ Toast.makeText(baseContext, “fail”, Toast.LENGTH_LONG).show() } } Calling UpdateUI()…

Details

Bootloader error after upgrading from 16.04 to 18.04 LTS. Pc does not restart. How to fix it(maybe using bios)?

Recently upgraded Ubuntu from 16.04 to 18.04 LTS. There’s an error while upgrading due to that grub was not installed.. Later on I installed and configured grub and then bootloader got corrupted. Now I cannot start my pc. I’m not using any other os in my pc only Ubuntu. I’m using Dell vostro. How can…

Details

Spring boot scheduler annotation on abstract class

I want to have schedular annotation on abstract class so that child classes doesnt need to have the annotations. Something similar to this in the abstract class @Bean public String getDelay(){ return someDelay; } @Scheduled(fixedRateString = “#{@getDelay}”) public void getZeroBytesFile(){ But it doesnt work and throws this exception org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name ‘getDelay’:…

Details

How can I turn on flashlight in old devices

I’m trying to run flashlight on old devices especially lower than API level 21 but unfortunately I got error Error java.lang.RuntimeException: Unable to start activity ComponentInfo{com.flashlight.app/com.test.MainActivity}: java.lang.RuntimeException: Fail to connect to camera service Code android.hardware.Camera camera = android.hardware.Camera.open(); android.hardware.Camera.Parameters parameters = camera.getParameters(); parameters.setFlashMode(android.hardware.Camera.Parameters.FLASH_MODE_TORCH); camera.setParameters(parameters); camera.startPreview();

Details