tezvyn:

What happens to a bound service during config changes and multiple clients?

Source: developer.android.comadvanced

Tests bound service reference counting. Config change destroys the Activity binding; if no other clients exist, the service stops. Multiple clients keep it alive until the last unbind. Red flag: assuming the service survives config changes without a rebind.

This tests bound service reference counting and client lifecycle coupling. When a config change destroys an Activity, its binding is torn down; if that was the sole binding and the service was not started, the service is destroyed and recreated only when the new Activity rebinds. With multiple bound clients, the service stays alive until the final unbind because the system tracks active connections. A red flag is claiming the service survives config changes automatically or that one unbind kills it regardless of other clients.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

What happens to a bound service during config changes and multiple clients? · Tezvyn