3

How can I kill ( or prevent the launch ) another app from my application if mine has Device Admin/ Device Owner permission ( not rooted ) ?

1 Answers1

1

A device owner can block applications :

DevicePolicyManager.setPackagesSuspended() : The application icon is greyed, and the user can not launch it, a message This application has been suspended by your administrator is displayed instead.

DevicePolicyManager.setApplicationHidden() : The application does not even appear in the launcher.

In both cases the application is not uninstalled and it's data is not deleted. As soon as you unhide / unsuspend it, the user will be able to use it again and pick up where they left off

bwt
  • 17,292
  • 1
  • 42
  • 60