mirror of
https://gitlab.com/fabinfra/fabaccess/borepin.git
synced 2025-03-13 07:11:56 +01:00
32 lines
716 B
C#
32 lines
716 B
C#
|
using Android.Content;
|
|||
|
using Android.OS;
|
|||
|
using FabAccessAPI;
|
|||
|
|
|||
|
namespace Borepin.Droid.Services
|
|||
|
{
|
|||
|
class APIServiceConnection : Java.Lang.Object, IServiceConnection
|
|||
|
{
|
|||
|
#region Members
|
|||
|
public bool IsConnected
|
|||
|
{
|
|||
|
get
|
|||
|
{
|
|||
|
return Binder != null;
|
|||
|
}
|
|||
|
}
|
|||
|
public APIBinder Binder { get; private set; } = null;
|
|||
|
#endregion
|
|||
|
|
|||
|
#region Methods
|
|||
|
public void OnServiceConnected(ComponentName name, IBinder service)
|
|||
|
{
|
|||
|
Binder = service as APIBinder;
|
|||
|
}
|
|||
|
|
|||
|
public void OnServiceDisconnected(ComponentName name)
|
|||
|
{
|
|||
|
Binder = null;
|
|||
|
}
|
|||
|
#endregion
|
|||
|
}
|
|||
|
}
|