I am currently using the accessibility service, but since android lollipop also requires that applications with access be activated Settings->Security->Applications with access-> myApplication
I am currently using the accessibility service, but since android lollipop also requires that applications with access be activated Settings->Security->Applications with access-> myApplication
Hello, I solved it in the following way:
With this I can go and open security->applications with access.
if (Build.VERSION.SDK_INT >= ConfigurationFile.MINIMUM_VERSION_TO_MONITOR_APP_USAGE) { Intent intent = new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS); startActivityForResult(intent, 0); }
//With this method I check if it is activated or not public boolean AppsAcessActivate(){
}
Do a
Intent
with ACTION_SECURITY_SETTINGS , though you can't access the details and it works minimal on API 16.The best thing that I recommend without having to use code is to adapt the Android Studio program with the downloads of the Android version packages so that the application will only be developed normally and will be compatible with the version you want:
After having done this, a window will appear with all the possible versions that there are for android studio and from there, when creating an application, you just have to select the version that you want: