{"action":"created","issue":{"url":"https://api.github.com/repos/calabash/calabash-android-server/issues/66","repository_url":"https://api.github.com/repos/calabash/calabash-android-server","labels_url":"https://api.github.com/repos/calabash/calabash-android-server/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/calabash/calabash-android-server/issues/66/comments","events_url":"https://api.github.com/repos/calabash/calabash-android-server/issues/66/events","html_url":"https://github.com/calabash/calabash-android-server/pull/66","id":338495541,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NDEwMTI1","number":66,"title":"Fixed deprecated target api popup issue on Android P","user":{"login":"AndreyMitsyk","id":7479096,"node_id":"MDQ6VXNlcjc0NzkwOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7479096?v=4","gravatar_id":"","url":"https://api.github.com/users/AndreyMitsyk","html_url":"https://github.com/AndreyMitsyk","followers_url":"https://api.github.com/users/AndreyMitsyk/followers","following_url":"https://api.github.com/users/AndreyMitsyk/following{/other_user}","gists_url":"https://api.github.com/users/AndreyMitsyk/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreyMitsyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreyMitsyk/subscriptions","organizations_url":"https://api.github.com/users/AndreyMitsyk/orgs","repos_url":"https://api.github.com/users/AndreyMitsyk/repos","events_url":"https://api.github.com/users/AndreyMitsyk/events{/privacy}","received_events_url":"https://api.github.com/users/AndreyMitsyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-05T09:29:09Z","updated_at":"2018-07-05T13:22:11Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/calabash/calabash-android-server/pulls/66","html_url":"https://github.com/calabash/calabash-android-server/pull/66","diff_url":"https://github.com/calabash/calabash-android-server/pull/66.diff","patch_url":"https://github.com/calabash/calabash-android-server/pull/66.patch"},"body":"**Problem:**\r\nOn Android P when we try to execute tests we have popup \"This app was built for an older version of Android ...\". This popup breaks test execution because UI elements can not be found under this popup.\r\n\r\n**Root-cause:**\r\nWe have incorrect manifest structure so Android P can't recognize target api version.\r\nAfter fixes we need to set target sdk >= 19 but < 24 to create reporter file (e.g. calabash_failure.out) inside data directory. If we will set target api >=24 we can't create public readable files in data dir on newer Android versions: https://developer.android.com/about/versions/nougat/android-7.0-changes#permfilesys\r\nIn addition, we need to change logic to create MODE_WORLD_READABLE files for api > 23: we need to use MODE_PRIVATE and set file perm via java api because MODE_WORLD_READABLE triggers security exception when target api >= 17 https://developer.android.com/reference/android/content/Context.html#MODE_WORLD_READABLE .\r\nThese changes removes deprecated target api popup and calabash android server will be ready for android P.\r\n\r\n**Changes:**\r\n- Added logic to create reporter files on newer android versions.\r\n- Fixed manifest.\r\n- Changed target sdk.\r\n\r\n---\r\nLocal calabash-server and Xamarin UI tests passed. Additional tests in progress."},"comment":{"url":"https://api.github.com/repos/calabash/calabash-android-server/issues/comments/402719828","html_url":"https://github.com/calabash/calabash-android-server/pull/66#issuecomment-402719828","issue_url":"https://api.github.com/repos/calabash/calabash-android-server/issues/66","id":402719828,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjcxOTgyOA==","user":{"login":"AndreyMitsyk","id":7479096,"node_id":"MDQ6VXNlcjc0NzkwOTY=","avatar_url":"https://avatars0.githubusercontent.com/u/7479096?v=4","gravatar_id":"","url":"https://api.github.com/users/AndreyMitsyk","html_url":"https://github.com/AndreyMitsyk","followers_url":"https://api.github.com/users/AndreyMitsyk/followers","following_url":"https://api.github.com/users/AndreyMitsyk/following{/other_user}","gists_url":"https://api.github.com/users/AndreyMitsyk/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreyMitsyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreyMitsyk/subscriptions","organizations_url":"https://api.github.com/users/AndreyMitsyk/orgs","repos_url":"https://api.github.com/users/AndreyMitsyk/repos","events_url":"https://api.github.com/users/AndreyMitsyk/events{/privacy}","received_events_url":"https://api.github.com/users/AndreyMitsyk/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T13:22:11Z","updated_at":"2018-07-05T13:22:11Z","author_association":"CONTRIBUTOR","body":"@kamstrup remember to update (copy-paste) manifest in UITest repo as well. I verified this locally on devices/emulators an popup issue is gone"}}
{"actor":{"display_login":"AndreyMitsyk"}}