Exemplo n.º 1
0
 public ServiceConnection(ServiceBinder binder)
 {
     if (binder != null)
     {
         Binder = binder;
     }
 }
Exemplo n.º 2
0
 // This gets called when a client tries to bind to the Service with an Intent and an
 // instance of the ServiceConnection. The system will locate a binder associated with the
 // running Service
 public void OnServiceConnected(ComponentName name, IBinder service)
 {
     if (service is ServiceBinder serviceBinder)
     {
         Binder         = serviceBinder;
         Binder.IsBound = true;
         ServiceConnected(this, new ServiceConnectedEventArgs {
             Binder = service
         });
     }
 }