I'm writing my first Android app. Essentially it shows and controls the score of a straight pool match. I've read articles about the lifecycle of an activity bu
I need to automatically refresh an Android Compose screen when the app returns to the foreground. I have an that requires permissions and location services. If
I created a timer app. So it's counting time basically and I'm saving the time to room when service close in OnDestroy scope. Is it best practise? Or is there a
I have a movie ticket booking app. My initial activity is the login activity where there is a "continue as guest" option in case he doesn't want to sign in or r
FATAL EXCEPTION: main Process: com.example.loan, PID: 24169 java.lang.IllegalStateException: Fragment already added: FormFragment{428f10c8 #1 id=0x7f050055 form
I need to know when the user kills my app (Force stop). I've been reading the android lifecycle, which has the onStop() and onDestroy() functions, these are rel
I am working on an Android app that needs to perform a clean-up task (disconnect BLE devices) when the whole application goes to background. I implemented the s
I'm trying to create an app that lets users log routes (locations/GPS). To ensure locations are logged even when the screen is off, I have created a foreground
This was probably a false alarm, see my own answer. Original question below: An activity has a button that takes the user to another activity. To launch the ne
MVVM architecture, this is my View (Activity): private MyApp app; private MainActivityVM viewModel; @Override protected void onCreate(Bundle savedInstanceSta
fun returnValue(): Int { viewModelScope.launch { return 1 // Something like this } } I want to return some value in a viewModelScope like the
I am using live data in my application for all the network calls and response handling. In one of the scenarios, my recycler view is loading some data in its v