To provide binding for a service, you must implement the onBind() callback method.
To create a bound service, implement the onBind() callback method to return an IBinder that defines the interface for communication with the service.
Чтобы создать привязанную службу, необходимо реализовать метод обратного вызова onBind() для возвращения объекта IBinder, который определяет интерфейс взаимодействия со службой.
However, if you choose to implement the onStartCommand() callback method, then you must explicitly stop the service, because the service is now considered to be started.
Однако, если вы решите реализовать метод обратного вызова onStartCommand(), вам необходимо явным образом остановить службу, поскольку в этом случае она считается запущенной.
This interface between the service and a client must be an implementation of IBinder and is what your service must return from the onBind() callback method.
Этот интерфейс между службой и клиентом должен быть реализацией объекта IBinder, которую ваша служба должна возвращать из метода обратного вызова onBind().
To provide a layout for a fragment, you must implement the onCreateView() callback method, which the Android system calls when it's time for the fragment to draw its layout.
Чтобы создать макет для фрагмента, разработчик должен реализовать метод обратного вызова onCreateView(), который система Android вызывает, когда для фрагмента наступает время отобразить свой макет.
When a checkable item is selected, the system calls your respective item-selected callback method (such as onOptionsItemSelected()).
Когда выбирается пункт, который может быть помечен, система вызывает соответствующий ему метод обратного вызова (например onOptionsItemSelected()).
Return this instance of Binder from the onBind() callback method.
The onCreate() callback method in your Activity is called by the Android framework when your Activity is launched (see the discussion about lifecycles, in the Activities document).
Метод обратного вызова onCreate() в вашей операции вызывается платформой Android во время запуска операции (см. сведения о жизненных циклах в документе Операции).
The ServiceConnection includes a callback method that the system calls to deliver the IBinder.
Интерфейс ServiceConnection включает метод обратного вызова, который система использует для того, чтобы выдать объект IBinder.
For more information about creating a service that provides binding, see the Bound Services document, which includes more information about the onRebind() callback method in the section about Managing the lifecycle of a bound service.
Дополнительные сведения о создании службы, которая обеспечивает привязку, см. в документе Привязанные службы, который содержит дополнительную информацию о методе обратного вызова onRebind() в разделе Управление жизненным циклом привязанной службы.
This is also the behavior of the OneWayAttribute attribute when applied to callback method signatures.
In the client, receive the Binder from the onServiceConnected() callback method and make calls to the bound service using the methods provided.
В клиенте получите класс Binder от метода обратного вызова onServiceConnected() и выполните вызовы к привязанной службе с помощью предоставленных методов.
Callback method is not supported, this can happen if the method is not marked with OperationContractAttribute or if its interface type is not the target of the ServiceContractAttribute's CallbackContract.
Метод обратного вызова не поддерживается. Это может произойти, если метод не помечен атрибутом OperationContractAttribute или если тип интерфейса не является целью CallbackContract атрибута ServiceContractAttribute.