{"action":"created","issue":{"url":"https://api.github.com/repos/PropelVentures/Cyrano/issues/16","labels_url":"https://api.github.com/repos/PropelVentures/Cyrano/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/PropelVentures/Cyrano/issues/16/comments","events_url":"https://api.github.com/repos/PropelVentures/Cyrano/issues/16/events","html_url":"https://github.com/PropelVentures/Cyrano/issues/16","id":76732311,"number":16,"title":"Location Features - Issues Pending?","user":{"login":"cjcornell","id":4732533,"avatar_url":"https://avatars.githubusercontent.com/u/4732533?v=3","gravatar_id":"","url":"https://api.github.com/users/cjcornell","html_url":"https://github.com/cjcornell","followers_url":"https://api.github.com/users/cjcornell/followers","following_url":"https://api.github.com/users/cjcornell/following{/other_user}","gists_url":"https://api.github.com/users/cjcornell/gists{/gist_id}","starred_url":"https://api.github.com/users/cjcornell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjcornell/subscriptions","organizations_url":"https://api.github.com/users/cjcornell/orgs","repos_url":"https://api.github.com/users/cjcornell/repos","events_url":"https://api.github.com/users/cjcornell/events{/privacy}","received_events_url":"https://api.github.com/users/cjcornell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PropelVentures/Cyrano/labels/Location-GPS","name":"Location-GPS","color":"bfdadc"},{"url":"https://api.github.com/repos/PropelVentures/Cyrano/labels/Not%20to%20Spec","name":"Not to Spec","color":"bfd4f2"}],"state":"open","locked":false,"assignee":{"login":"dakshatechnologies","id":7022293,"avatar_url":"https://avatars.githubusercontent.com/u/7022293?v=3","gravatar_id":"","url":"https://api.github.com/users/dakshatechnologies","html_url":"https://github.com/dakshatechnologies","followers_url":"https://api.github.com/users/dakshatechnologies/followers","following_url":"https://api.github.com/users/dakshatechnologies/following{/other_user}","gists_url":"https://api.github.com/users/dakshatechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/dakshatechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakshatechnologies/subscriptions","organizations_url":"https://api.github.com/users/dakshatechnologies/orgs","repos_url":"https://api.github.com/users/dakshatechnologies/repos","events_url":"https://api.github.com/users/dakshatechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/dakshatechnologies/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/PropelVentures/Cyrano/milestones/3","html_url":"https://github.com/PropelVentures/Cyrano/milestones/Re-enable%20Geo-GPS%20functionality%20%20(Part%20A%20&%20B)","labels_url":"https://api.github.com/repos/PropelVentures/Cyrano/milestones/3/labels","id":1104923,"number":3,"title":"Re-enable Geo-GPS functionality  (Part A & B)","description":"Created:  03-29-2015  by CJ Cornell\r\nUpdate:  04-13-2015  by CJ Cornell\r\nUpdate:  05-05-2015  by CJ Cornell  - Clarifications added\r\n\r\n==============================================================================\r\nMILESTONE - Re-enable Geo-GPS functionality\r\n(also known as location-based reminders and announcements)\r\n==============================================================================\r\n\r\nOverview:\r\n--------------\r\nNow, in addition to Cyrano checking the server for matching BTIDs, Cyrano will also inquire based on the phone's current GPS coordinates. \r\n\r\nREST calls will return announcements, triggers (and scripts) that are to be executed based on being close to the GPS coordinates). Some of thi may be new or need to be updated from existing.\r\n\r\n\r\n\r\nBackground Info\r\n---------------\r\n+ There is a table within the cyrano database:   \"Locations\"   (this is like users - except each is a location defined by a GPS coordinate and distance-range)\r\n\r\n+ Also, Devices, users, friends, triggers (which are primarily assocaited with BTIDs) have a \"coordinate\" field, for the future purpose of triggering announcements and scripts upon \"GPS proximity\"\r\n\r\n+ Cyrano had 30-50% of functionality already, that was disabled - so re-use it!\r\n\r\n+ Every polling cycle, Cyrano should report (via REST) its current GPS location to the server (this is stored in the Users record)\r\n\r\n\r\n\r\n+ Currently, almost all REST calls require a BTID to return the matched records. This feature set will require some rest calls to instead use a GPS coordinate to return the matched records.\r\n\r\n=====================\r\nFunctionality:\r\n\r\n\r\nPart A - Detect\r\n-------------------\r\n(capture GPS Coordinates, Report to Server, Store/Update in Scan File, Prior State File)\r\n\r\n\t* (new?) REST call to query the \"locations\" table - sending the current GPS location\r\n\t\r\n\t* Location table (via rest call) returns records containing announcements and trigger IDs for any recorrd making the GPS coordinates + some preset distance range\r\n\t\r\n\t* locations should ALSO be stored in the \"prior_state\" file  (with mute/snooze info) just like BTIDs.\r\n\t\r\n\tSee  Cyrano - MILESTONE 6-  Simulation Mode Improvement(s) and New Polling Rules.txt\r\n\t\r\n\t\r\n\r\nPart B - Execute\r\n(match with \"locations table\", \"users\" and \"triggers\" ...  display/announce)\r\n\r\n\r\n\t* locations are treat very very similar to nearby friends, devices and triggers - particularly in the polling loop (and menu displays)\r\n\t* \t\r\n\t\t* if detected in the current GPS scan (REST call sends the gps coord to server, which responds with any valid location-ids within the user's preset distance settings)\r\n\t\t\r\n\t\t* if these detected location-IDs are not prior muted/snoozed (via the prior_state file) then the locations are \r\n\t\t\r\n\t\t\r\n\t\t* locations may auto_play and auto display announcements, and then triigger a script/commands  (if parameter non-blank)\t\r\n\t\r\nComments/Clarifications\r\n\r\n\t- Locations should be handled almost identical to BTID scanning (and reporting).\r\n\t- Location GPS coordinate is captured at the same time as the BTIDs are scanned  (right after, in the polling sequence)\r\n\t- Note that the current GPS location should also be reported via REST to update the users current location.\r\n\t- GPS Coordinate is stored in the Prior State file, and handled identically to the BTID\r\n\t- Just like the polling sequence does for BTIDs, the polling sequence will now inquire, via REST whether there are matches to \"nearby\" friends, locations and execute script/triggers based on location.\r\n\t\r\n\t- Part A is mainly about\r\n\t\t1. re-enabling GPS detection, and and capturing latest coordinates during the polling loop.\r\n\t\t2. re-enabling GPS reporting (of the current user's GPS) to the REST server.\r\n\t\t3. adding the GPS coordinate to the polling loop (and prior state)\r\n\t\t4. treating the GPS coordinate the same (for mute/snooze)\r\n\t- Part B is mainly about\t\r\n\t\t1. Modifying/Updating the REST functions so that the app can inquire about friends, locations and triggers that match the current coordinates.\r\n\t\t2. adding users detected via location to the \"nearby\" list and announcements, executing script triggers.\r\n\t\t3. listing names of \"locations\" found (matching the coordinates) - this is a new list called \"locations\"\r\n\t\t4. Enable Mute/Snooze within the list current locations and users found.\r\n\r\n\r\nUse internal parameters (settings) for now, that will indicate\r\na. if location detection is enabled or not \r\nb. whether automatic audio announcements for locations are enabled\r\n\r\n\r\n\r\n===============================\r\n\r\n\r\n\t\t* locations may direct the client to play a script or script_command\r\n\r\n\r\n\r\nPart C - Display Menus: List, Maps, Details.\r\n\r\n\t* Just like other lists (for nearby devices, triggers etc) there should be a list of \"nearby places (locations)\" - showing the name and distance \r\n\t* locations have\r\n\t* location alerts\" available in a list tapping any one will display the text of the alert and allow the user to \"play\" the alert (or trigger), or to snooze/mute the alert\r\n\t* operates same as others:  tapping shows details.  menu ability to mute/snooze (or \"play the announcement)\r\n\t* map view (alternate view) should show icons for 'locations' and with ! if there is a pending alert, and showing icons for mute/snooze\r\n\t* tapping on any location icon show details screen (above)\r\n\r\n","creator":{"login":"cjcornell","id":4732533,"avatar_url":"https://avatars.githubusercontent.com/u/4732533?v=3","gravatar_id":"","url":"https://api.github.com/users/cjcornell","html_url":"https://github.com/cjcornell","followers_url":"https://api.github.com/users/cjcornell/followers","following_url":"https://api.github.com/users/cjcornell/following{/other_user}","gists_url":"https://api.github.com/users/cjcornell/gists{/gist_id}","starred_url":"https://api.github.com/users/cjcornell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjcornell/subscriptions","organizations_url":"https://api.github.com/users/cjcornell/orgs","repos_url":"https://api.github.com/users/cjcornell/repos","events_url":"https://api.github.com/users/cjcornell/events{/privacy}","received_events_url":"https://api.github.com/users/cjcornell/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-05-11T14:38:25Z","updated_at":"2015-05-15T14:41:22Z","due_on":"2015-05-13T07:00:00Z","closed_at":null},"comments":3,"created_at":"2015-05-15T13:49:46Z","updated_at":"2015-05-19T16:03:18Z","closed_at":null,"body":"Tested build \r\nCyrano_05_13_2013_03  and  Cyrano_05_15_2015_04.apk\r\n\r\nMy User Location  (User 100) = \r\n33.684185\t-111.9903541\r\n\r\nThe last 2 should be detected as locations at least  (and announce, display in a list, and trigger a scriipt).   They are not showing at all....\r\nNot sure if it is a bug or the test... or both\r\n\r\nLook in Locations\r\nid\tuser_id\tlocation_id\tGPS_latitude\tGPS_longitude\tdistance_range\tlocation_type\t\r\n1\t206\t1\t30.718681\t76.7055\t2\tPLACE\twork place\t\r\n2\t207\t2\t31.2027555\t75.8603609\t2\tdemo\tdemo\t\r\n3\t100\t3\t200\t200\t50\tTest 1\tJust the Test 1\tHere is the description for test \r\n4\t100\t4\t33\t-111\t3\tApplia\tRefrigerator\tA test of a refrigerator close \r\n5\t100\t5\t40\t-110\t11\tCar\tMy Jeep\tTest of my jeep - 11 feet away.\t\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/PropelVentures/Cyrano/issues/comments/103566480","html_url":"https://github.com/PropelVentures/Cyrano/issues/16#issuecomment-103566480","issue_url":"https://api.github.com/repos/PropelVentures/Cyrano/issues/16","id":103566480,"user":{"login":"cjcornell","id":4732533,"avatar_url":"https://avatars.githubusercontent.com/u/4732533?v=3","gravatar_id":"","url":"https://api.github.com/users/cjcornell","html_url":"https://github.com/cjcornell","followers_url":"https://api.github.com/users/cjcornell/followers","following_url":"https://api.github.com/users/cjcornell/following{/other_user}","gists_url":"https://api.github.com/users/cjcornell/gists{/gist_id}","starred_url":"https://api.github.com/users/cjcornell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cjcornell/subscriptions","organizations_url":"https://api.github.com/users/cjcornell/orgs","repos_url":"https://api.github.com/users/cjcornell/repos","events_url":"https://api.github.com/users/cjcornell/events{/privacy}","received_events_url":"https://api.github.com/users/cjcornell/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T16:03:18Z","updated_at":"2015-05-19T16:03:18Z","body":"Take a look at my questions:\r\n\r\n\r\nplease let me know which of these should work right now:\r\n\r\n1. announcements of # locations\r\n2. TTS of specific location (about)\r\n3. mute/snooze of locations\r\n4. script execution (triggers) based on location\r\n\r\n"}}