Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Creating Mobile Application Projects | Coding a Mobile Application | Permissions API
 
Permissions API
 
Determining Existing Permissions
Requesting New Permissions
In the past, mobile platforms would require an application to declare any required permissions at install time. Nowadays, there are a much larger number of permissions that an application may ask for, and users have become more wary of blindly granting these permissions up front. It now makes sense for applications to ask for permission for an operation or resource at run time when it is needed. That way, the user can be made aware of what the application is doing, and why it needs that particular permission. To support this use case, Mobile Designer provides a class to ask for permissions at run time, com.softwareag.mobile.md.permissions.PermissionsManager.
The PermissionsManager class defines the permission types that may be queried. Although their names are self-explanatory in most cases, some have additional caveats:
*PERMISSION_LOCATION_GENERAL - A rough estimate of location, usually through IP address lookup or nearest cell tower.
*PERMISSION_LOCATION_PRECISE - GPS will be requested if available, otherwise this will fall back to the "general" permission.
*PERMISSION_WRITE_EXT_STORAGE and PERMISSION_READ_EXT_STORAGE - Will always be denied on devices that have no hardware provision for external storage.