如何给黑莓应用所有可用的许可? [英] How to give blackberry application all the available permission?

查看:145
本文介绍了如何给黑莓应用所有可用的许可?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用JDE 4.5不包含PERMISSION_RECORDING发展,
和它的默认否认4.6和更高版本的设备。

I'm developing using JDE 4.5 which doesn't contain the PERMISSION_RECORDING, and it's denied by default in 4.6 and higher devices.

所以我想我的应用程序有这个权限,否则所有可能的权限,它可以得到的。

So I want my application to have this permission or all the possible permissions that it can get.

先谢谢了。

推荐答案

您不能设置应用权限亲语法。你可以做的是强制请求权限对话框出现,请参阅如何 - 显示自定义消息在请求许可对话框

You can't set app permissions pro grammatically. What you can do is force Request Permission dialog to appear, see How to - Display custom messages in the request permission dialog

所以你可以做的是做一些测试记录应用程序启动,然后请求权限对话框将会弹出。它会拿出无论如何,但在启动时,这将是比较到位的,更多的,则可以在设置自己的信息文本。

So what you can do is do some test recording on application startup, then Request Permission dialog will come up. It would come up anyway, but on startup this will be more in place, and more, you can set your own message text there.

更新结果
如果权限被设置为拒绝比不会有PROMT对话框中否认采取行动。结果
然后你可以使用ApplicationPermissionManager调用权限的要求:

UPDATE
If permission is set to Deny than there will be no Promt Dialog on denied action.
Then you can use ApplicationPermissionManager to invoke permission request:

ApplicationPermissionsManager manager = ApplicationPermissionsManager
    .getInstance();
int current = manager
    .getPermission(ApplicationPermissions.PERMISSION_SCREEN_CAPTURE);
if (current != ApplicationPermissions.VALUE_ALLOW) {
    ApplicationPermissions permissions = new ApplicationPermissions();
    permissions.addPermission(ApplicationPermissions.PERMISSION_SCREEN_CAPTURE);
    manager.invokePermissionsRequest(permissions);
}

这篇关于如何给黑莓应用所有可用的许可?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆