Top "Android-lifecycle" questions

Questions regarding the events forwarded by the system to components, during their lifetime, in an Android Application.

Correctly open/close a database with Singleton design pattern

I am creating an application which makes a lot of interactions with a database (both read and write operations). To …

android android-sqlite android-lifecycle sqliteopenhelper
Does android save static variables?

I'm writing a simple android application which is basically a modification of the fragments demo available in the android documentation. …

android android-lifecycle static-variables
When to save data to database, onPause() or onStop()?

I know this question has been asked a million times, I myself though that I already knew the answer and …

android android-activity android-lifecycle android-database
android - There is no default constructor for ArrayAdapter

I m making adapter to adapt my book collection to be visible in list view. Issue is solved if I …

android android-lifecycle oncreate onpause activity-lifecycle
Fragment lifecycle events in LifeCycleAware Fragment

I have a lifecycle aware fragment and a LifecycleObserver class public class MyFragment extends Fragment { @Override public void onCreate(@Nullable …

android android-fragments android-lifecycle fragment-lifecycle
Best way to implement Socket.io in android

I am planning to implement Socket.io in android by this library for a chat based application. As far as …

java android sockets socket.io android-lifecycle
Android fragments vs compound controls

Why should Android 3.0 fragments be used instead of compound controls? One can create a View inheritor or compound control once …

android android-fragments controls fragment android-lifecycle
How to pausing and resume a service

I'm an android beginner, and unfortunately I could not find a satisfying answer for my service problem so far. I …

android service android-lifecycle resume
Android: ViewModel. Failed to call observer method

I'm using new arch. components from google. I have in Activity Login/Registering Fragments that are managed thanks to FragmentTransaction …

android android-fragments android-lifecycle android-viewmodel
When to use and when not to use a Service in Android

I have been developing for Android for little less then 2 years, and I am still puzzled by this seemingly simple …

android android-service android-lifecycle