Skip to content

Tag: android

How to access a variable of a service from an activity

I understand that in order to access methods of a service from an activity, we should bind the service. But if we just want to get the value of a variable in the service, can we just access it like so without binding? It works, but I’m not sure if it has any memory leak implications or any other issues.

Handle Response Kotlin Retrofit

I’m new to Kotlin and android development. Have been struggling to get my retrofit api to work. But have found a way to do it after some search on SO. I get the data response now, but I don’t know how to “separate” it, so that i can work around with it. this is my json response: and my…

Modifying the scoring of a quiz app (android studio)

Context about the app: This is a sample 5 question test app that I made while I also learned firebase database just yesterday. The app is working perfectly and it does it needs to do, BUT what I wanna do next is that there are no right answers and each button corresponds to a score ex: Question: What are you