Files
ironlicensing-dotnet/Platforms/Android/MachineIdentifier.cs
David Friedel 7d453f8f63 Initial commit: IronLicensing.Client SDK
Software licensing SDK for .NET MAUI applications with:
- License validation and activation
- Feature gating
- Trial support
- Offline validation with signature verification
- In-app purchase integration
2025-12-25 09:07:58 +00:00

33 lines
862 B
C#

using Android.Provider;
namespace IronLicensing.Client;
public partial class MachineIdentifier
{
private partial List<string> GetMachineComponents()
{
var components = new List<string>();
try
{
// Android ID - unique to each app/device combination
var context = Android.App.Application.Context;
var androidId = Settings.Secure.GetString(context.ContentResolver, Settings.Secure.AndroidId);
if (!string.IsNullOrEmpty(androidId))
{
components.Add(androidId);
}
components.Add(Android.OS.Build.Brand ?? "");
components.Add(Android.OS.Build.Model ?? "");
components.Add(Android.OS.Build.Serial ?? "");
}
catch
{
// Fallback
}
return components;
}
}