{"action":"closed","issue":{"url":"https://api.github.com/repos/greysonp/permiso/issues/7","repository_url":"https://api.github.com/repos/greysonp/permiso","labels_url":"https://api.github.com/repos/greysonp/permiso/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/greysonp/permiso/issues/7/comments","events_url":"https://api.github.com/repos/greysonp/permiso/issues/7/events","html_url":"https://github.com/greysonp/permiso/issues/7","id":132583872,"number":7,"title":"Deny doesn't call onPermissionResult","user":{"login":"behelit","id":11013784,"avatar_url":"https://avatars.githubusercontent.com/u/11013784?v=3","gravatar_id":"","url":"https://api.github.com/users/behelit","html_url":"https://github.com/behelit","followers_url":"https://api.github.com/users/behelit/followers","following_url":"https://api.github.com/users/behelit/following{/other_user}","gists_url":"https://api.github.com/users/behelit/gists{/gist_id}","starred_url":"https://api.github.com/users/behelit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/behelit/subscriptions","organizations_url":"https://api.github.com/users/behelit/orgs","repos_url":"https://api.github.com/users/behelit/repos","events_url":"https://api.github.com/users/behelit/events{/privacy}","received_events_url":"https://api.github.com/users/behelit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-10T01:19:56Z","updated_at":"2016-02-14T21:35:51Z","closed_at":"2016-02-14T21:35:51Z","body":"I'm using permiso in a fragment within a tablayout `Fragment extends ListFragment`\r\nIn the `onResume` I am performing the permission request:\r\n\r\n```\r\n@Override\r\n    public void onResume()\r\n    {\r\n        super.onResume();\r\n\r\n        Permiso.getInstance().setActivity(getActivity());\r\n\r\n        Log.e(TAG, \"Requesting Contact Permission\");\r\n\r\n        Permiso.getInstance().requestPermissions(new Permiso.IOnPermissionResult()\r\n        {\r\n            @Override\r\n            public void onPermissionResult(Permiso.ResultSet resultSet)\r\n            {\r\n                if(resultSet.areAllPermissionsGranted())\r\n                {\r\n                    Log.e(TAG, \"Contact Permission Granted\");\r\n                }\r\n                else\r\n                {\r\n                    Log.e(TAG, \"Contact Permission Denied\");\r\n                }\r\n            }\r\n\r\n            @Override\r\n            public void onRationaleRequested(Permiso.IOnRationaleProvided callback, String... permissions)\r\n            {\r\n                Permiso.getInstance().showRationaleInDialog(getText(R.string.contacts_string_contactpermissiontitle).toString(), getText(R.string.contacts_string_contactpermissionrationale).toString(), null, callback);\r\n            }\r\n        }, Manifest.permission.WRITE_CONTACTS);\r\n    }\r\n```\r\n\r\nThe onPermissionResult is never called if the 'Deny' option is pressed.\r\nIt all works correctly if 'Allow' is pressed.\r\n\r\nPlease note, the contact fragment is not the default tab but it is next to it so it gets loaded anyway.\r\n\r\nI have also set:\r\n```\r\n@Override\r\n    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)\r\n    {\r\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults);\r\n        Permiso.getInstance().onRequestPermissionResult(requestCode, permissions, grantResults);\r\n    }\r\n```\r\nand\r\n```\r\n@Override\r\n    public void onCreate(Bundle savedInstanceState)\r\n    {\r\n        super.onCreate(savedInstanceState);\r\n\r\n        // Setup permission library\r\n        Permiso.getInstance().setActivity(getActivity());\r\n    }\r\n```"}}