在我的应用程序中,我正在使用Facebook集成,但无法找到我应使用的支票/权限。我只是写了一些代码,但无法找到所有媒体权限以及“ addpermission”或“ Application Permission”

private void checkPermissions()
{
    ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
    ApplicationPermissions original = apm.getApplicationPermissions();

    if ((original.getPermission(ApplicationPermissions.PERMISSION_MEDIA) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_LOCATION_DATA) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_RECORDING) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_DEVICE_SETTINGS) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_CROSS_APPLICATION_COMMUNICATION) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_INTERNET) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_SERVER_NETWORK) == ApplicationPermissions.VALUE_ALLOW) &&
        (original.getPermission(ApplicationPermissions.PERMISSION_EMAIL) == ApplicationPermissions.VALUE_ALLOW))
    {
        return;
    }
}

最佳答案

您必须在应用程序中使用这些不同类型的权限,才能解决您的问题

  ApplicationPermissions permRequest = new ApplicationPermissions();
  permRequest.addPermission(ApplicationPermissions.PERMISSION_MEDIA);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_LOCATION_DATA);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_RECORDING);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_DEVICE_SETTINGS);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_CROSS_APPLICATION_COMMUNICATION);

  permRequest.addPermission(ApplicationPermissions.PERMISSION_INTERNET);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_SERVER_NETWORK);
  permRequest.addPermission(ApplicationPermissions.PERMISSION_EMAIL);

关于java - Blackberry检查许可以实现Facebook集成,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/17074153/

10-10 06:02