webMethods Mobile Suite  | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Creating Mobile Application Projects | 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. The following example shows how to create an myPermissionCallback object which implements the IPermissionCallback interface in com.softwareag.mobile.md.permissions:
PermissionsManager.requestPermissionFor(PermissionsManager.PERMISSION_CAMERA,
myPermissionCallback);
If permission is allowed or denied, or if the application is interrupted, the myPermissionCallback object is notified. If the application is interrupted, you can request the permission again (if it is appropriate).

Copyright © 2010-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.