{"action":"created","issue":{"url":"https://api.github.com/repos/y20k/trackbook/issues/10","repository_url":"https://api.github.com/repos/y20k/trackbook","labels_url":"https://api.github.com/repos/y20k/trackbook/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/y20k/trackbook/issues/10/comments","events_url":"https://api.github.com/repos/y20k/trackbook/issues/10/events","html_url":"https://github.com/y20k/trackbook/issues/10","id":202318618,"number":10,"title":"Idea for displaying multiple recorded files","user":{"login":"collectorgeneral","id":15972594,"avatar_url":"https://avatars3.githubusercontent.com/u/15972594?v=3","gravatar_id":"","url":"https://api.github.com/users/collectorgeneral","html_url":"https://github.com/collectorgeneral","followers_url":"https://api.github.com/users/collectorgeneral/followers","following_url":"https://api.github.com/users/collectorgeneral/following{/other_user}","gists_url":"https://api.github.com/users/collectorgeneral/gists{/gist_id}","starred_url":"https://api.github.com/users/collectorgeneral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectorgeneral/subscriptions","organizations_url":"https://api.github.com/users/collectorgeneral/orgs","repos_url":"https://api.github.com/users/collectorgeneral/repos","events_url":"https://api.github.com/users/collectorgeneral/events{/privacy}","received_events_url":"https://api.github.com/users/collectorgeneral/received_events","type":"User","site_admin":false},"labels":[{"id":432887070,"url":"https://api.github.com/repos/y20k/trackbook/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-01-21T14:30:51Z","updated_at":"2017-03-13T21:19:47Z","closed_at":"2017-03-13T21:19:47Z","body":"Now that displaying last recorded track is more or less fully functional, we can perhaps proceed to implementing full fledged history display. \r\nI remember somewhere you said you were first going to display a few files at a time. I was thinking about it yesterday, I think there is a simpler way to do an arbitrary number of files. We know that all files are stored under Android/data/org.y20k.trackbook/*.trackbook. Why not pull up a list of files, put them in a variable and load the current file to display? \r\nAs an example, on a shell I know I would type `ls /Android/data/org.y20k.trackbook/*.trackbook` and this will give the list of files that can be read by trackbook. You can pull this list (use `trim()` if necessary) and cycle through the list when the user wants to go to the previous or next track. The list *may* have to be updated everytime the 'History' tab is opened. \r\nas an example, I know doing this is pretty simple on something like Python, you call the function to get the list of files, store the results in a list, and allocate a variable to keep the current index(can always start at 0) and just `load(file_list([ind]))`. Everytime user presses back or forward, increment/decrement index as required and load() again. You can wrap around/disable the buttons if `ind<0 or ind>len(file_list)`. This does not really require you do manually keep a track of EVERY track ever recorded, because the list is generated dynamically. Due to generating list of files dynamically, this method can also avoid circumstances where user moves new tracks in/moves old tracks out for backup purposes. \r\nHowever I *could* vastly be underestimating the requirements for Android, if that is the case do let me know! \r\nAs for how to provide an interface to actually allow the said cycling, to keep things simple, you could just put two buttons on the top or bottom (like `<<` `>>` or `Prev Track` `Next Track`) that will allow users to move forward or backward. Edit: Alternatively, you could show a dropdown list of the all files where the user can tap any file they want and load that file. \r\nOf course, all this at your own time 😄 . As usual, do not hesitate to release beta apks for me to break and annoy you with 😆 \r\n"},"comment":{"url":"https://api.github.com/repos/y20k/trackbook/issues/comments/286247288","html_url":"https://github.com/y20k/trackbook/issues/10#issuecomment-286247288","issue_url":"https://api.github.com/repos/y20k/trackbook/issues/10","id":286247288,"user":{"login":"y20k","id":9103935,"avatar_url":"https://avatars1.githubusercontent.com/u/9103935?v=3","gravatar_id":"","url":"https://api.github.com/users/y20k","html_url":"https://github.com/y20k","followers_url":"https://api.github.com/users/y20k/followers","following_url":"https://api.github.com/users/y20k/following{/other_user}","gists_url":"https://api.github.com/users/y20k/gists{/gist_id}","starred_url":"https://api.github.com/users/y20k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/y20k/subscriptions","organizations_url":"https://api.github.com/users/y20k/orgs","repos_url":"https://api.github.com/users/y20k/repos","events_url":"https://api.github.com/users/y20k/events{/privacy}","received_events_url":"https://api.github.com/users/y20k/received_events","type":"User","site_admin":false},"created_at":"2017-03-13T21:19:47Z","updated_at":"2017-03-13T21:19:47Z","body":"Track selection is now implemented. A delete option is already planned (see [TrackFragment.java#L179](https://github.com/y20k/trackbook/blob/0eaaf55f757c8a0e2db560facad9d6210ce2a156/app/src/main/java/org/y20k/trackbook/MainActivityTrackFragment.java#L179)).\r\n\r\nI guess I can close this issue."}}
{"actor":{"display_login":"y20k"}}