{"action":"created","issue":{"url":"https://api.github.com/repos/deltachat/deltachat-android/issues/318","repository_url":"https://api.github.com/repos/deltachat/deltachat-android","labels_url":"https://api.github.com/repos/deltachat/deltachat-android/issues/318/labels{/name}","comments_url":"https://api.github.com/repos/deltachat/deltachat-android/issues/318/comments","events_url":"https://api.github.com/repos/deltachat/deltachat-android/issues/318/events","html_url":"https://github.com/deltachat/deltachat-android/issues/318","id":328411415,"node_id":"MDU6SXNzdWUzMjg0MTE0MTU=","number":318,"title":"Some Android-Versions return bad download folder -> importing PGP keys fails","user":{"login":"t-oster","id":1052720,"node_id":"MDQ6VXNlcjEwNTI3MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1052720?v=4","gravatar_id":"","url":"https://api.github.com/users/t-oster","html_url":"https://github.com/t-oster","followers_url":"https://api.github.com/users/t-oster/followers","following_url":"https://api.github.com/users/t-oster/following{/other_user}","gists_url":"https://api.github.com/users/t-oster/gists{/gist_id}","starred_url":"https://api.github.com/users/t-oster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-oster/subscriptions","organizations_url":"https://api.github.com/users/t-oster/orgs","repos_url":"https://api.github.com/users/t-oster/repos","events_url":"https://api.github.com/users/t-oster/events{/privacy}","received_events_url":"https://api.github.com/users/t-oster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-01T07:32:22Z","updated_at":"2018-06-02T07:08:57Z","closed_at":"2018-06-02T07:08:57Z","author_association":"NONE","body":"Delta Chat version: v0.17.3\r\n\r\nWhen trying to import existing PGP Keys, the app uses `Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)` to determine the Download folder.\r\n\r\nOn my device (Oukitel K6000 Plus, Android 7.0) the download folder is `/sdcard/Download`, so it should look there.\r\n\r\nHowever the function returns  `/storage/emulated/0/Download`, which is not readable on my device (I tried with various file-managers and Termux), nor is it linked to the real Download folder.\r\nSo there seems to be a Bug in Android, which causes a wrong folder to be returned, which makes importing keys impossible for me.\r\nI am not the only one: https://stackoverflow.com/questions/34041741/environment-directory-downloads-returns-incorrect-directory)\r\n\r\nMaybe we should consider using a file-manager dialog or at least let the user manually override the path in order to allow imports on buggy Androids.\r\n"},"comment":{"url":"https://api.github.com/repos/deltachat/deltachat-android/issues/comments/394064879","html_url":"https://github.com/deltachat/deltachat-android/issues/318#issuecomment-394064879","issue_url":"https://api.github.com/repos/deltachat/deltachat-android/issues/318","id":394064879,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDA2NDg3OQ==","user":{"login":"t-oster","id":1052720,"node_id":"MDQ6VXNlcjEwNTI3MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1052720?v=4","gravatar_id":"","url":"https://api.github.com/users/t-oster","html_url":"https://github.com/t-oster","followers_url":"https://api.github.com/users/t-oster/followers","following_url":"https://api.github.com/users/t-oster/following{/other_user}","gists_url":"https://api.github.com/users/t-oster/gists{/gist_id}","starred_url":"https://api.github.com/users/t-oster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-oster/subscriptions","organizations_url":"https://api.github.com/users/t-oster/orgs","repos_url":"https://api.github.com/users/t-oster/repos","events_url":"https://api.github.com/users/t-oster/events{/privacy}","received_events_url":"https://api.github.com/users/t-oster/received_events","type":"User","site_admin":false},"created_at":"2018-06-02T07:08:57Z","updated_at":"2018-06-02T07:08:57Z","author_association":"NONE","body":"Well now that I have a working debug build, I can confirm that `/storage/emulated/0/Download` in fact works from the app. The problem was that if I export my key with thunderbird, it will also prepend the public key so that the file is ignored.\r\nThe detailed description from #98 helped me importing my existing key, so this was false alarm.\r\nI thought about adding a file-open dialog, but since the core-api expects a folder instead of a file, I think we can do this later.\r\nPossible improvements:\r\n\r\n- Make the import function list all candidates with errors so the users gets a hint\r\n- Add an intent to pick a folder instead of only the Download folder\r\n- Check for private keys following public keys, so keys exported from thunderbird/enigmail GUI work out of the box"}}
{"actor":{"display_login":"t-oster"}}