Building Mobile Enterprise Applications : Using webMethods Mobile Designer : 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 runtime 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 now provides a class to ask for permissions at runtime, com.softwareag.mobile.md.permissions.PermissionsManager.
Note:  
For Windows Phone and Windows Tablet devices, it is not currently possible to determine at runtime what permissions are available, and ask for new ones. Therefore, the device will always return "permission granted" for features that are supported on that platform, and "permission denied" at all other times.
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.
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback