Devices without an "Application Using Usage Data" or Android .settings.USAGE_ACCESS_SETTINGS

Background: Android 5 introduced the new UsageStats API, which can be used to request time spent on various applications. This API is used in several applications to detect the current foreground application (as discussed in several issues such as this ), but:

This API requires the permission android.permission.PACKAGE_USAGE_STATS, which is a permission at the system level and will not be granted to third-party applications. However, the declaration of permission implies an intention to use the API, and the device user can provide permission through the Settings application.

Since permission is not granted to the user, applications send the user to Settings using the intent with the action android.settings.USAGE_ACCESS_SETTINGS , but sometimes even this setting is not available:

In some cases, the corresponding activity may not exist, so make sure you protect it.

This means that on these phones it is almost impossible to access usage statistics.

This has been discussed in other matters, such as here and here . Apparently, some manufacturers decided to remove functionality from some devices (in particular, Samsung and LG, but, possibly, others).

Question: The purpose of this question is to collect information about devices that do not allow access to these settings. Please send the brand, model and version of os where you find that it is. Also, if someone can find an alternative way to access usage statistics, it would be helpful for others if you share it.

, API, getRecentTasks, getRunningAppProcesses ( ) Manifest.

+4
1

, , :

Model                     OS version
Samsung Galaxy Note 3     5.0
Samsung Galaxy S4         5.0.1
Samsung Galaxy Note S4    5.0.1
Samsung Galaxy S5         5.0
Samsung Galaxy S5 CDMA    5.0
Meizu m2 note             5.1
Samsung Galaxy S5         5.0
OnePlus One               5.0.2
Meizu MX4                 5.0.1

, :

LG G3                     5.0
+2

All Articles