So mean to say is that android service start’s only once in its lifecycle and keep it running till stopped. if any other client want to start it again then only onStartCommand() method will invoked all the time .
Read moreWhat is a service android?
An Android service is a component that is designed to do some work without a user interface . A service might download a file, play music, or apply a filter to an image. Services can also be used for interprocess communication (IPC) between Android applications.
Read moreHow do you start a thread service?
To create and start a new thread, from inside an activity, you can say: Thread t = new Thread(){ public void run(){ getApplicationContext(). bindService( new Intent(getApplicationContext(), MyAndroidUpnpServiceImpl. class), serviceConnection, Context.
Read moreWhat is the correct way to start a service in Android?
Starting a service You can start a service from an activity or other application component by passing an Intent to startService() or startForegroundService() . The Android system calls the service’s onStartCommand() method and passes it the Intent , which specifies which service to start.27 Eki 2021
Read more