C#C
C#3y ago
r2d25551

❔ .NET MAUI GetSystemService returns null

All the calls to GetSystemService return null.
Has anyone used this before?
Am I doing something wrong?

string[] serviceNames = new string[]
{
    "ACCESSIBILITY_SERVICE",
    "ACCOUNT_SERVICE",
    "ACTIVITY_SERVICE",
    "ALARM_SERVICE",
    "APP_OPS_SERVICE",
    :
};

foreach (string serviceName in serviceNames)
{
    Java.Lang.Object? service = Android.App.Application.Context.GetSystemService(serviceName);
    :
}
Was this page helpful?