Skip to content

Instantly share code, notes, and snippets.

@FreakyAli
Created August 23, 2022 16:19
Show Gist options
  • Save FreakyAli/92cd2b5d7ea051f4909a65764bbe6c45 to your computer and use it in GitHub Desktop.
Save FreakyAli/92cd2b5d7ea051f4909a65764bbe6c45 to your computer and use it in GitHub Desktop.
Interface for NFCService
public interface INfcService
{
/// <summary>
/// Configuration for NFC service
/// </summary>
public void ConfigureNfcAdapter()
{
}
/// <summary>
/// Enable NFC search
/// </summary>
public void EnableForegroundDispatch()
{
}
/// <summary>
/// Disable NFC search
/// </summary>
public void DisableForegroundDispatch()
{
}
/// <summary>
/// Unconfigure NFC services
/// </summary>
public void UnconfigureNfcAdapter()
{
}
/// <summary>
/// Send data over NFC
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
public Task SendAsync(byte[] bytes);
/// <summary>
/// Open NFC settings, This is only for Android.
/// </summary>
/// <returns></returns>
public Task<bool> OpenNFCSettingsAsync() => Task.FromResult(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment