{"action":"created","issue":{"url":"https://api.github.com/repos/ridsatrio/kopi/issues/4","labels_url":"https://api.github.com/repos/ridsatrio/kopi/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/ridsatrio/kopi/issues/4/comments","events_url":"https://api.github.com/repos/ridsatrio/kopi/issues/4/events","html_url":"https://github.com/ridsatrio/kopi/issues/4","id":113348371,"number":4,"title":"IllegalArgumentException when requesting run-time permissions","user":{"login":"ridsatrio","id":9133225,"avatar_url":"https://avatars.githubusercontent.com/u/9133225?v=3","gravatar_id":"","url":"https://api.github.com/users/ridsatrio","html_url":"https://github.com/ridsatrio","followers_url":"https://api.github.com/users/ridsatrio/followers","following_url":"https://api.github.com/users/ridsatrio/following{/other_user}","gists_url":"https://api.github.com/users/ridsatrio/gists{/gist_id}","starred_url":"https://api.github.com/users/ridsatrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridsatrio/subscriptions","organizations_url":"https://api.github.com/users/ridsatrio/orgs","repos_url":"https://api.github.com/users/ridsatrio/repos","events_url":"https://api.github.com/users/ridsatrio/events{/privacy}","received_events_url":"https://api.github.com/users/ridsatrio/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ridsatrio/kopi/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"ridsatrio","id":9133225,"avatar_url":"https://avatars.githubusercontent.com/u/9133225?v=3","gravatar_id":"","url":"https://api.github.com/users/ridsatrio","html_url":"https://github.com/ridsatrio","followers_url":"https://api.github.com/users/ridsatrio/followers","following_url":"https://api.github.com/users/ridsatrio/following{/other_user}","gists_url":"https://api.github.com/users/ridsatrio/gists{/gist_id}","starred_url":"https://api.github.com/users/ridsatrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridsatrio/subscriptions","organizations_url":"https://api.github.com/users/ridsatrio/orgs","repos_url":"https://api.github.com/users/ridsatrio/repos","events_url":"https://api.github.com/users/ridsatrio/events{/privacy}","received_events_url":"https://api.github.com/users/ridsatrio/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-26T12:51:56Z","updated_at":"2015-10-27T06:25:55Z","closed_at":"2015-10-27T06:25:55Z","body":"Requesting permission using the helper class `Permissions` gave out an `IllegalArgumentException`. The stack trace stated that we should, \"...only use lower 8 bits for requestCode\".\r\n\r\nPresumably, this is caused by the usage of bit-flag-styled numbering for request codes used in said class.\r\n\r\nHere's the full stack trace:\r\n\r\n```\r\nCaused by: java.lang.IllegalArgumentException: Can only use lower 8 bits for requestCode\r\n   at android.support.v4.app.FragmentActivity.validateRequestPermissionsRequestCode(FragmentActivity.java:799)\r\n   at android.support.v4.app.ActivityCompatApi23.requestPermissions(ActivityCompat23.java:29)\r\n   at android.support.v4.app.ActivityCompat.requestPermissions(ActivityCompat.java:316)\r\n   at id.ridsatrio.kopi.security.Permissions.request(Permissions.java:155)\r\n   at id.ridsatrio.kopi.security.Permissions.requestCamera(Permissions.java:54)\r\n   at id.ridsatrio.kopi.sample.DemoActivity.onCreate(DemoActivity.java:14)\r\n   at android.app.Activity.performCreate(Activity.java:6237)\r\n   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)\r\n   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)\r\n   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) \r\n   at android.app.ActivityThread.-wrap11(ActivityThread.java) \r\n   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) \r\n   at android.os.Handler.dispatchMessage(Handler.java:102) \r\n   at android.os.Looper.loop(Looper.java:148) \r\n   at android.app.ActivityThread.main(ActivityThread.java:5417) \r\n   at java.lang.reflect.Method.invoke(Native Method) \r\n   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) \r\n   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) \r\n```"},"comment":{"url":"https://api.github.com/repos/ridsatrio/kopi/issues/comments/151388796","html_url":"https://github.com/ridsatrio/kopi/issues/4#issuecomment-151388796","issue_url":"https://api.github.com/repos/ridsatrio/kopi/issues/4","id":151388796,"user":{"login":"ridsatrio","id":9133225,"avatar_url":"https://avatars.githubusercontent.com/u/9133225?v=3","gravatar_id":"","url":"https://api.github.com/users/ridsatrio","html_url":"https://github.com/ridsatrio","followers_url":"https://api.github.com/users/ridsatrio/followers","following_url":"https://api.github.com/users/ridsatrio/following{/other_user}","gists_url":"https://api.github.com/users/ridsatrio/gists{/gist_id}","starred_url":"https://api.github.com/users/ridsatrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ridsatrio/subscriptions","organizations_url":"https://api.github.com/users/ridsatrio/orgs","repos_url":"https://api.github.com/users/ridsatrio/repos","events_url":"https://api.github.com/users/ridsatrio/events{/privacy}","received_events_url":"https://api.github.com/users/ridsatrio/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T06:25:55Z","updated_at":"2015-10-27T06:25:55Z","body":"Solved (again) alongside commit 1546961."}}