Building Mobile Enterprise Applications : Using webMethods Mobile Designer : Coding a Mobile Application : Permissions API : Requesting New Permissions
Requesting New Permissions
In situations where the application needs to request a permission, the method requestPermissionFor() is used. This method may take a while to negotiate, and as such, is asynchronous. Here, we create an Object called myPermissionCallback which implements the IPermissionCallback interface in com.softwareag.mobile.md.permissions:
PermissionsManager.requestPermissionFor(PermissionsManager.PERMISSION_CAMERA,
myPermissionCallback);
When the user allows or denies the application permission, or if the application is interrupted, the myPermissionCallback Object will be notified. If the application is interrupted, it is up to the application developer to make the request for that permission again (if it is appropriate).
Copyright © 2007-2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback