Книга: Beginning Android
Manual Transmission
Manual Transmission
In addition to binding to the service for the purposes of IPC, you can manually start and stop the service. This is particularly useful in cases where you want the service to keep running independently of your activities — otherwise, once you unbind the service, your service could well be closed down.
To start a service, simply call startService()
, providing two parameters:
1. The Intent
specifying the service to start (again, the easiest way is probably to specify the service class, if it’s your own service)
2. A Bundle
providing configuration data, which eventually gets passed to the service’s onStart()
method
Conversely, to stop the service, call stopService()
with the Intent
you used in the corresponding startService()
call.
- Manually Configuring Quotas
- Starting and Stopping Services Manually
- Manually Restoring the Partition Table
- Configuring the Loopback Interface Manually
- Configuring a PPPoE Connection Manually
- Configuring a Dialup Connection Manually
- Starting the Apache Server Manually
- Manually Configuring Samba with
- Reading Manual Pages with man
- 9.9.7 CAN Message Transmission
- The Transmission Control Protocol
- Tuning the Transmission Protocol