Friday, September 18, 2009

call permission manager

The code I am using is as follows:

ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
if (apm.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) != ApplicationPermissions.VALUE_ALLOW) {
ApplicationPermissions ap = new ApplicationPermissions();
ap.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
ApplicationPermissionsManager.getInstance().invokePermissionsRequest(ap);
}

This brings up the interface for the user to set the permissions. In the Input Simulation options, the only option available is Deny, there is no Allow or Prompt. But on other options, for example Files, all the options are available. Also on the other devices the Input Simulation has all these options available.

No comments: