1using System.Collections.Concurrent;
2using System.Threading.Tasks;
35 private ConcurrentQueue<AppIntent> intentQueue =
new();
45 this.intentQueue.Enqueue(intent);
62 while (this.intentQueue.TryDequeue(out
AppIntent? Intent))
85 if (!
string.IsNullOrEmpty(intent.
Data))
95 if (intent.
Payload is NfcTag NfcTag)
119 ConcurrentQueue<AppIntent> newIntents =
new();
121 string? OnboardingUrl =
null;
123 while (this.intentQueue.TryDequeue(out
AppIntent? Intent))
129 OnboardingUrl = Intent.Data;
134 newIntents.Enqueue(Intent);
137 this.intentQueue = newIntents;
138 return OnboardingUrl;
Represents an instance of the Neuro-Access app.
static new? App Current
Gets the current application instance.
Contains intent action constants used for inter-component communication within the app.
const string OpenUrl
Action used to open a URL, typically triggered by deep linking.
const string NfcTagDiscovered
Action triggered when an NFC tag is discovered.
const string Onboarding
Onboarding URI Scheme (obinfo)
static ? string GetScheme(string Url)
Gets the predefined scheme from an IoT Code
A set of never changing property constants and helpful values.
Represents an application intent containing an action, optional data, and an optional payload.
string? Data
Gets or sets the optional string data associated with the intent. This might be used for deep links.
string Action
Gets or sets the action associated with the intent.
object? Payload
Gets or sets an optional payload containing additional information (e.g. a cross‑platform NFC tag).
The IntentService class is responsible for handling and processing application intents in a cross‑pla...
void QueueIntent(AppIntent intent)
Queues an intent for later processing.
async Task ProcessQueuedIntentsAsync()
Processes all queued intents asynchronously. This method will dequeue and process each intent until t...
async Task< string?> TryGetAndDequeueOnboardingUrl()
Processes a OpenUrl intent with onboarding by returning value
async Task ProcessIntentAsync(AppIntent intent)
Processes a single intent asynchronously.
Near-Field Communication (NFC) Service.
async Task TagDetected(INfcTag Tag)
Method called when a new NFC Tag has been detected.
Base class that references services in the app.
static ILogService LogService
Log service.
Defines the contract for a service that handles application intents.
Interface for the Near-Field Communication (NFC) Service.