These vendors use ColorOS, which adds aggressive power and background restrictions on top of standard Android. That’s why your current ActionIgnoreBackgroundDataRestrictionsSettings intent works on Samsung/Pixel/etc. but not on Oppo
Unfortunately, there’s no universal API for Oppo’s proprietary settings. You need to:
Handle standard Android APIs (what you already do).
Detect if the device is Oppo/Realme (ColorOS).
- Redirect to OEM-specific settings screens via custom intents.
You can detect the brand with:
string manufacturer = Android.OS.Build.Manufacturer?.ToLower();
if (manufacturer.Contains("oppo") || manufacturer.Contains("realme"))
{
try
{
// Try to open Oppo "Auto Start" settings
Intent intent = new Intent();
intent.SetComponent(new ComponentName(
"com.coloros.safecenter",
"com.coloros.safecenter.permission.startup.StartupAppListActivity"
));
activity.StartActivity(intent);
}
catch (Exception)
{
try
{
// Fallback for some Oppo/Realme models
Intent intent = new Intent();
intent.SetComponent(new ComponentName(
"com.coloros.safecenter",
"com.coloros.safecenter.startupapp.StartupAppListActivity"
));
activity.StartActivity(intent);
}
catch (Exception)
{
// Final fallback – open general settings
Intent intent = new Intent(Android.Provider.Settings.ActionSettings);
activity.StartActivity(intent);
}
}
}
else
{
// Default Android handling
activity.StartActivity(new Intent(
Android.Provider.Settings.ActionIgnoreBackgroundDataRestrictionsSettings,
Android.Net.Uri.Parse("package:" + activity.PackageName)
));
}