{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/2005","labels_url":"https://api.github.com/repos/realm/realm-java/issues/2005/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/2005/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/2005/events","html_url":"https://github.com/realm/realm-java/issues/2005","id":123902544,"number":2005,"title":"Android Realm Permission","user":{"login":"crysan","id":683015,"avatar_url":"https://avatars.githubusercontent.com/u/683015?v=3","gravatar_id":"","url":"https://api.github.com/users/crysan","html_url":"https://github.com/crysan","followers_url":"https://api.github.com/users/crysan/followers","following_url":"https://api.github.com/users/crysan/following{/other_user}","gists_url":"https://api.github.com/users/crysan/gists{/gist_id}","starred_url":"https://api.github.com/users/crysan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crysan/subscriptions","organizations_url":"https://api.github.com/users/crysan/orgs","repos_url":"https://api.github.com/users/crysan/repos","events_url":"https://api.github.com/users/crysan/events{/privacy}","received_events_url":"https://api.github.com/users/crysan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Help","name":"Help","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-12-26T01:00:38Z","updated_at":"2015-12-28T07:08:40Z","closed_at":"2015-12-28T07:08:13Z","body":"Hi!\r\nI use Realm\r\n\r\n<code>compile 'io.realm:realm-android:0.87.1'</code>\r\n\r\nThe configuration database is defined in the class\r\n\r\n<code>MyApplication extends Application</code>\r\n\r\nAnd the database file is stored on the SD card.\r\n\r\n    myConfig = new RealmConfiguration.Builder(Environment.getExternalStorageDirectory().toString() + \"/MyApp/Db/\")\r\n            .name(getResources().getString(R.string.app_name_db) + \".realm\")\r\n            .schemaVersion(6)\r\n            .migration(migration)\r\n            .build();\r\n    Realm.setDefaultConfiguration(myConfig);\r\n\r\nRun on Android 6.0 gives an error that does not have permissions to read / write the SD card. On the Internet there are many examples to address this issue in the class Activity. But what if I need to get permission in a class MyApplication which set the parameters of the database?"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/167497315","html_url":"https://github.com/realm/realm-java/issues/2005#issuecomment-167497315","issue_url":"https://api.github.com/repos/realm/realm-java/issues/2005","id":167497315,"user":{"login":"crysan","id":683015,"avatar_url":"https://avatars.githubusercontent.com/u/683015?v=3","gravatar_id":"","url":"https://api.github.com/users/crysan","html_url":"https://github.com/crysan","followers_url":"https://api.github.com/users/crysan/followers","following_url":"https://api.github.com/users/crysan/following{/other_user}","gists_url":"https://api.github.com/users/crysan/gists{/gist_id}","starred_url":"https://api.github.com/users/crysan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crysan/subscriptions","organizations_url":"https://api.github.com/users/crysan/orgs","repos_url":"https://api.github.com/users/crysan/repos","events_url":"https://api.github.com/users/crysan/events{/privacy}","received_events_url":"https://api.github.com/users/crysan/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T07:08:40Z","updated_at":"2015-12-28T07:08:40Z","body":"Sorry reopen the issue."}}