Android – Services and concurrency PART 3

Android – Services and concurrency PART 3

You can also read Part 1 and Part 2. Started services by default does not create its own thread or run in a separate process, it runs on the main thread of the application. There are two ways to make a service concurrent. by adding in AndroidManifest.xml as service property android:process=”ProcessNamE” This way a different processed is used, and it is not recommended because it can use a lot of system resources. by using IntentService instead of Service that automates and simplifies the programming of concurrent started services. IntentService extends…

Android – Services and concurrency PART 3 Read More

Android – Services, started and bound services PART 1

Android – Services, started and bound services PART 1

Services are used to perform long-duration operations and/or access remote resources through background thread/process. They do not interact with the user directly but for example through status bar notifications. Services can be launched by activities via intents or by broadcast receivers. They can continue to run even if there is a runtime configuration change (screen rotation). started service It is launched via startService() and its lifecycle is independent of its creating component. You can pass parameters via the intent started the service. There is no need to return a result…

Android – Services, started and bound services PART 1 Read More