{"action":"created","issue":{"url":"https://api.github.com/repos/ppareit/swiftp/issues/95","repository_url":"https://api.github.com/repos/ppareit/swiftp","labels_url":"https://api.github.com/repos/ppareit/swiftp/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/ppareit/swiftp/issues/95/comments","events_url":"https://api.github.com/repos/ppareit/swiftp/issues/95/events","html_url":"https://github.com/ppareit/swiftp/issues/95","id":233813625,"number":95,"title":"Server not visible on network after phone screen switched off for a while","user":{"login":"elParaguayo","id":946265,"avatar_url":"https://avatars1.githubusercontent.com/u/946265?v=3","gravatar_id":"","url":"https://api.github.com/users/elParaguayo","html_url":"https://github.com/elParaguayo","followers_url":"https://api.github.com/users/elParaguayo/followers","following_url":"https://api.github.com/users/elParaguayo/following{/other_user}","gists_url":"https://api.github.com/users/elParaguayo/gists{/gist_id}","starred_url":"https://api.github.com/users/elParaguayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elParaguayo/subscriptions","organizations_url":"https://api.github.com/users/elParaguayo/orgs","repos_url":"https://api.github.com/users/elParaguayo/repos","events_url":"https://api.github.com/users/elParaguayo/events{/privacy}","received_events_url":"https://api.github.com/users/elParaguayo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2017-06-06T08:19:16Z","updated_at":"2017-06-28T19:06:30Z","closed_at":null,"body":"Hi there,\r\n\r\nI'm really hoping this app will be able to do what I need. I'm currently automating transcoding of recorded TV on my TVHeadend server and then transferring to my phone.\r\n\r\nTo do this, I need the server to be on constantly when I'm on my home wifi to allow my script to discover my phone and transfer the file. \r\n\r\nI scan the network for the ftp port and retrieve the IP address of the device that has this port open. This script works fine when the screen is active but once the screen is off for a certain amount of time it appears that the port is no longer open.\r\n\r\nI'm currently using the Demo version (but will happily pay if this works) and have ticked the \"Keep device awake (full CPU speed)\" option.\r\n\r\nI've also disabled power saving options for this app on my phone (Galaxy S8 Android 7.0).\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/ppareit/swiftp/issues/comments/311757338","html_url":"https://github.com/ppareit/swiftp/issues/95#issuecomment-311757338","issue_url":"https://api.github.com/repos/ppareit/swiftp/issues/95","id":311757338,"user":{"login":"elParaguayo","id":946265,"avatar_url":"https://avatars1.githubusercontent.com/u/946265?v=3","gravatar_id":"","url":"https://api.github.com/users/elParaguayo","html_url":"https://github.com/elParaguayo","followers_url":"https://api.github.com/users/elParaguayo/followers","following_url":"https://api.github.com/users/elParaguayo/following{/other_user}","gists_url":"https://api.github.com/users/elParaguayo/gists{/gist_id}","starred_url":"https://api.github.com/users/elParaguayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elParaguayo/subscriptions","organizations_url":"https://api.github.com/users/elParaguayo/orgs","repos_url":"https://api.github.com/users/elParaguayo/repos","events_url":"https://api.github.com/users/elParaguayo/events{/privacy}","received_events_url":"https://api.github.com/users/elParaguayo/received_events","type":"User","site_admin":false},"created_at":"2017-06-28T19:06:29Z","updated_at":"2017-06-28T19:06:29Z","body":"Just a thought, adb lists my currently whitelisted apps:\r\n```mDeviceIdleWhitelist=[1000, 1001, 1201, 5002, 10002, 10007, 10026, 10037, 10042, 10045, 10048, 10050, 10056, 10059, 10095, 10123, 10132, 10152, 10169, 10174, 10175, 10179, 10194, 10201]```\r\nbut, according to adb, the partial_wake_lock is held by:\r\n```PARTIAL_WAKE_LOCK              'FsService' (uid=10264, pid=2689, ws=null) (uid=10264, pid=2689, ws=null, pkg=be.ppareit.swiftp, elapsedTime=1014167)```\r\nNow, I know virtually nothing about Android programming, but if the uid is the identifier for the app then it doesn't seem to be whitelisted.\r\n\r\nInterestingly, FTPServer, which does work, is also not in this Whitelist so I'm not convinced it's the solution.\r\n\r\nNevertheless, I ran:\r\n```adb shell dumpsys deviceidle whitelist +be.ppareit.swiftp```\r\nand the uid now appeared in the whitelist.\r\n\r\nI restarted the app, screen off for 5 mins and... it works!\r\n\r\nScreen's off for 20 mins and it's still connecting.\r\n\r\n\r\n"}}
{"actor":{"display_login":"elParaguayo"}}