I am encountering an issue with the Android Enterprise API in .NET Core. The problem I am facing is that when calling the management API to retrieve information about the private app we've added, it does not return the specific permission "android.permission.PACKAGE_USAGE_STATS." However, other special permissions such as "android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" are present in the list.
This is how I am calling the api to get application's info:
await _androidEnterpriseService.Products.Get(enterprise, "app:" + packageName).ExecuteAsync()
I've also tried using Android Management Api but still not getting that permission.
private async Task<Application> GetApplication(string enterprise, string packageName)
{
using (AndroidManagementService _androidService = _manager.GetAndroidService())
{
return await _androidService.Enterprises.Applications.Get($"enterprises/{enterprise}/applications/{packageName}").ExecuteAsync();
}
}
Mobile team has informed us that they've added "usage_stats" permission in the manifest file but I assume it's either a limitation by Google or there is another way to retrieve "usage_stats" permission.
Because I want Admins to grant this permission to a certain policy.