Docker MySQL mysqli::real_connect():(HY000/2002): Connection refused

I’m new to docker/docker-compose. I’m trying to connect 2 containers which are the CodeIgniter application and MySQL. I can’t seems to solve the ‘mysqli::real_connect(): (HY000/2002): Connection refused’ issue on my web app. I was able to ping from inside the container to the other and vice versa. This is my docker-compose.yml file: version: ‘3’ services:…

Details

ViewModel observe is triggered more than twice while the API is hitting only once

The viewmodel observe is triggering up many times(3-4) in a row for the same event in both fragment and activity. Here’s the viewmodel code: userModel.getResponseSuperRegion(countryID) userModel.responseSuperRegion.observe(this, Observer { if(it!=null) { Log.e(TAG,”Observer ran!!!!”) Utils.debugger(“FRAG “, “$it”) requestResults(countryID, date, spec, it!!.get(0).nameValue, businessUnit) }else{ Toast.makeText(applicationContext, “Data Not Available!”, Toast.LENGTH_LONG).show() dismissProgress() } }) the same type of code i…

Details