{"action":"created","comment":{"url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/comments/91959205","pull_request_review_id":12468136,"id":91959205,"diff_hunk":"@@ -0,0 +1,68 @@\n+package org.mobilitychoices;\n+\n+import android.content.Context;\n+import android.location.Address;\n+import android.location.Geocoder;\n+import android.os.AsyncTask;\n+\n+import org.json.JSONObject;\n+import org.mobilitychoices.entities.Track;\n+import org.mobilitychoices.remote.GetAllTracksTask;\n+import org.mobilitychoices.remote.Response;\n+\n+import java.io.IOException;\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+public class GeocoderTask extends AsyncTask<ArrayList<Track>, Object, ArrayList<Track>> {\n+\n+    private IGeocoderCallback iGeocoderCallback;\n+    private Context context;\n+    public GeocoderTask(IGeocoderCallback callback, Context c) {\n+        iGeocoderCallback = callback;\n+        context = c;\n+    }\n+\n+    @Override\n+    protected ArrayList<Track> doInBackground(ArrayList<Track>... arrayLists) {\n+        ArrayList<Track> tracks = arrayLists[0];\n+\n+        for (Track t :\n+                tracks) {\n+            System.out.println(\"Geocoder loop: \" + t.getId());\n+            Geocoder geocoder;\n+            List<Address> addresses1;\n+            List<Address> addresses2;\n+            geocoder = new Geocoder(context);\n+            try {\n+                addresses1 = geocoder.getFromLocation(t.getStart().getLatitude(),\n+                        t.getStart().getLongitude(), 1);\n+                String address = addresses1.get(0).getThoroughfare();\n+                String city = addresses1.get(0).getLocality();","path":"app/src/main/java/org/mobilitychoices/GeocoderTask.java","position":41,"original_position":41,"commit_id":"1b28196bc5188ffd16e67a50a328196480ccc4d2","original_commit_id":"1b28196bc5188ffd16e67a50a328196480ccc4d2","user":{"login":"optionset","id":12849807,"avatar_url":"https://avatars.githubusercontent.com/u/12849807?v=3","gravatar_id":"","url":"https://api.github.com/users/optionset","html_url":"https://github.com/optionset","followers_url":"https://api.github.com/users/optionset/followers","following_url":"https://api.github.com/users/optionset/following{/other_user}","gists_url":"https://api.github.com/users/optionset/gists{/gist_id}","starred_url":"https://api.github.com/users/optionset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/optionset/subscriptions","organizations_url":"https://api.github.com/users/optionset/orgs","repos_url":"https://api.github.com/users/optionset/repos","events_url":"https://api.github.com/users/optionset/events{/privacy}","received_events_url":"https://api.github.com/users/optionset/received_events","type":"User","site_admin":false},"body":"```java\r\nList<Address> startAddress = geocoder.getFromLocation(t.getStart().getLatitude(), t.getStart.getLongitude(), 1);\r\nString street = startAddress.get(0).getThoroughfare();\r\nString city = startAddress.get(0).getLocality();\r\n```\r\n\r\nsame for `endAddress`","created_at":"2016-12-12T14:44:08Z","updated_at":"2016-12-12T14:45:12Z","html_url":"https://github.com/MobilityChoices/mc-android/pull/4#discussion_r91959205","pull_request_url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/comments/91959205"},"html":{"href":"https://github.com/MobilityChoices/mc-android/pull/4#discussion_r91959205"},"pull_request":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4","id":97512081,"html_url":"https://github.com/MobilityChoices/mc-android/pull/4","diff_url":"https://github.com/MobilityChoices/mc-android/pull/4.diff","patch_url":"https://github.com/MobilityChoices/mc-android/pull/4.patch","issue_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues/4","number":4,"state":"open","locked":false,"title":"optimize imports","user":{"login":"jpo2433","id":11349312,"avatar_url":"https://avatars.githubusercontent.com/u/11349312?v=3","gravatar_id":"","url":"https://api.github.com/users/jpo2433","html_url":"https://github.com/jpo2433","followers_url":"https://api.github.com/users/jpo2433/followers","following_url":"https://api.github.com/users/jpo2433/following{/other_user}","gists_url":"https://api.github.com/users/jpo2433/gists{/gist_id}","starred_url":"https://api.github.com/users/jpo2433/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpo2433/subscriptions","organizations_url":"https://api.github.com/users/jpo2433/orgs","repos_url":"https://api.github.com/users/jpo2433/repos","events_url":"https://api.github.com/users/jpo2433/events{/privacy}","received_events_url":"https://api.github.com/users/jpo2433/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-12T08:34:04Z","updated_at":"2016-12-12T14:45:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a719b0cca2c25cd091f5e7bd3e68ee2c30d5ad35","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4/commits","review_comments_url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4/comments","review_comment_url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues/4/comments","statuses_url":"https://api.github.com/repos/MobilityChoices/mc-android/statuses/1b28196bc5188ffd16e67a50a328196480ccc4d2","head":{"label":"MobilityChoices:allRoutes1216","ref":"allRoutes1216","sha":"1b28196bc5188ffd16e67a50a328196480ccc4d2","user":{"login":"MobilityChoices","id":22609748,"avatar_url":"https://avatars.githubusercontent.com/u/22609748?v=3","gravatar_id":"","url":"https://api.github.com/users/MobilityChoices","html_url":"https://github.com/MobilityChoices","followers_url":"https://api.github.com/users/MobilityChoices/followers","following_url":"https://api.github.com/users/MobilityChoices/following{/other_user}","gists_url":"https://api.github.com/users/MobilityChoices/gists{/gist_id}","starred_url":"https://api.github.com/users/MobilityChoices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobilityChoices/subscriptions","organizations_url":"https://api.github.com/users/MobilityChoices/orgs","repos_url":"https://api.github.com/users/MobilityChoices/repos","events_url":"https://api.github.com/users/MobilityChoices/events{/privacy}","received_events_url":"https://api.github.com/users/MobilityChoices/received_events","type":"Organization","site_admin":false},"repo":{"id":71868546,"name":"mc-android","full_name":"MobilityChoices/mc-android","owner":{"login":"MobilityChoices","id":22609748,"avatar_url":"https://avatars.githubusercontent.com/u/22609748?v=3","gravatar_id":"","url":"https://api.github.com/users/MobilityChoices","html_url":"https://github.com/MobilityChoices","followers_url":"https://api.github.com/users/MobilityChoices/followers","following_url":"https://api.github.com/users/MobilityChoices/following{/other_user}","gists_url":"https://api.github.com/users/MobilityChoices/gists{/gist_id}","starred_url":"https://api.github.com/users/MobilityChoices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobilityChoices/subscriptions","organizations_url":"https://api.github.com/users/MobilityChoices/orgs","repos_url":"https://api.github.com/users/MobilityChoices/repos","events_url":"https://api.github.com/users/MobilityChoices/events{/privacy}","received_events_url":"https://api.github.com/users/MobilityChoices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MobilityChoices/mc-android","description":"Android App","fork":false,"url":"https://api.github.com/repos/MobilityChoices/mc-android","forks_url":"https://api.github.com/repos/MobilityChoices/mc-android/forks","keys_url":"https://api.github.com/repos/MobilityChoices/mc-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MobilityChoices/mc-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MobilityChoices/mc-android/teams","hooks_url":"https://api.github.com/repos/MobilityChoices/mc-android/hooks","issue_events_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues/events{/number}","events_url":"https://api.github.com/repos/MobilityChoices/mc-android/events","assignees_url":"https://api.github.com/repos/MobilityChoices/mc-android/assignees{/user}","branches_url":"https://api.github.com/repos/MobilityChoices/mc-android/branches{/branch}","tags_url":"https://api.github.com/repos/MobilityChoices/mc-android/tags","blobs_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MobilityChoices/mc-android/statuses/{sha}","languages_url":"https://api.github.com/repos/MobilityChoices/mc-android/languages","stargazers_url":"https://api.github.com/repos/MobilityChoices/mc-android/stargazers","contributors_url":"https://api.github.com/repos/MobilityChoices/mc-android/contributors","subscribers_url":"https://api.github.com/repos/MobilityChoices/mc-android/subscribers","subscription_url":"https://api.github.com/repos/MobilityChoices/mc-android/subscription","commits_url":"https://api.github.com/repos/MobilityChoices/mc-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/MobilityChoices/mc-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/MobilityChoices/mc-android/contents/{+path}","compare_url":"https://api.github.com/repos/MobilityChoices/mc-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MobilityChoices/mc-android/merges","archive_url":"https://api.github.com/repos/MobilityChoices/mc-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MobilityChoices/mc-android/downloads","issues_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues{/number}","pulls_url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls{/number}","milestones_url":"https://api.github.com/repos/MobilityChoices/mc-android/milestones{/number}","notifications_url":"https://api.github.com/repos/MobilityChoices/mc-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MobilityChoices/mc-android/labels{/name}","releases_url":"https://api.github.com/repos/MobilityChoices/mc-android/releases{/id}","deployments_url":"https://api.github.com/repos/MobilityChoices/mc-android/deployments","created_at":"2016-10-25T06:58:04Z","updated_at":"2016-10-25T07:08:29Z","pushed_at":"2016-12-12T13:53:32Z","git_url":"git://github.com/MobilityChoices/mc-android.git","ssh_url":"git@github.com:MobilityChoices/mc-android.git","clone_url":"https://github.com/MobilityChoices/mc-android.git","svn_url":"https://github.com/MobilityChoices/mc-android","homepage":null,"size":238,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"MobilityChoices:master","ref":"master","sha":"e75adf96c0a7470fb3bf51383b915069bf70f315","user":{"login":"MobilityChoices","id":22609748,"avatar_url":"https://avatars.githubusercontent.com/u/22609748?v=3","gravatar_id":"","url":"https://api.github.com/users/MobilityChoices","html_url":"https://github.com/MobilityChoices","followers_url":"https://api.github.com/users/MobilityChoices/followers","following_url":"https://api.github.com/users/MobilityChoices/following{/other_user}","gists_url":"https://api.github.com/users/MobilityChoices/gists{/gist_id}","starred_url":"https://api.github.com/users/MobilityChoices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobilityChoices/subscriptions","organizations_url":"https://api.github.com/users/MobilityChoices/orgs","repos_url":"https://api.github.com/users/MobilityChoices/repos","events_url":"https://api.github.com/users/MobilityChoices/events{/privacy}","received_events_url":"https://api.github.com/users/MobilityChoices/received_events","type":"Organization","site_admin":false},"repo":{"id":71868546,"name":"mc-android","full_name":"MobilityChoices/mc-android","owner":{"login":"MobilityChoices","id":22609748,"avatar_url":"https://avatars.githubusercontent.com/u/22609748?v=3","gravatar_id":"","url":"https://api.github.com/users/MobilityChoices","html_url":"https://github.com/MobilityChoices","followers_url":"https://api.github.com/users/MobilityChoices/followers","following_url":"https://api.github.com/users/MobilityChoices/following{/other_user}","gists_url":"https://api.github.com/users/MobilityChoices/gists{/gist_id}","starred_url":"https://api.github.com/users/MobilityChoices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MobilityChoices/subscriptions","organizations_url":"https://api.github.com/users/MobilityChoices/orgs","repos_url":"https://api.github.com/users/MobilityChoices/repos","events_url":"https://api.github.com/users/MobilityChoices/events{/privacy}","received_events_url":"https://api.github.com/users/MobilityChoices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MobilityChoices/mc-android","description":"Android App","fork":false,"url":"https://api.github.com/repos/MobilityChoices/mc-android","forks_url":"https://api.github.com/repos/MobilityChoices/mc-android/forks","keys_url":"https://api.github.com/repos/MobilityChoices/mc-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MobilityChoices/mc-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MobilityChoices/mc-android/teams","hooks_url":"https://api.github.com/repos/MobilityChoices/mc-android/hooks","issue_events_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues/events{/number}","events_url":"https://api.github.com/repos/MobilityChoices/mc-android/events","assignees_url":"https://api.github.com/repos/MobilityChoices/mc-android/assignees{/user}","branches_url":"https://api.github.com/repos/MobilityChoices/mc-android/branches{/branch}","tags_url":"https://api.github.com/repos/MobilityChoices/mc-android/tags","blobs_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MobilityChoices/mc-android/statuses/{sha}","languages_url":"https://api.github.com/repos/MobilityChoices/mc-android/languages","stargazers_url":"https://api.github.com/repos/MobilityChoices/mc-android/stargazers","contributors_url":"https://api.github.com/repos/MobilityChoices/mc-android/contributors","subscribers_url":"https://api.github.com/repos/MobilityChoices/mc-android/subscribers","subscription_url":"https://api.github.com/repos/MobilityChoices/mc-android/subscription","commits_url":"https://api.github.com/repos/MobilityChoices/mc-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/MobilityChoices/mc-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/MobilityChoices/mc-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/MobilityChoices/mc-android/contents/{+path}","compare_url":"https://api.github.com/repos/MobilityChoices/mc-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MobilityChoices/mc-android/merges","archive_url":"https://api.github.com/repos/MobilityChoices/mc-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MobilityChoices/mc-android/downloads","issues_url":"https://api.github.com/repos/MobilityChoices/mc-android/issues{/number}","pulls_url":"https://api.github.com/repos/MobilityChoices/mc-android/pulls{/number}","milestones_url":"https://api.github.com/repos/MobilityChoices/mc-android/milestones{/number}","notifications_url":"https://api.github.com/repos/MobilityChoices/mc-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MobilityChoices/mc-android/labels{/name}","releases_url":"https://api.github.com/repos/MobilityChoices/mc-android/releases{/id}","deployments_url":"https://api.github.com/repos/MobilityChoices/mc-android/deployments","created_at":"2016-10-25T06:58:04Z","updated_at":"2016-10-25T07:08:29Z","pushed_at":"2016-12-12T13:53:32Z","git_url":"git://github.com/MobilityChoices/mc-android.git","ssh_url":"git@github.com:MobilityChoices/mc-android.git","clone_url":"https://github.com/MobilityChoices/mc-android.git","svn_url":"https://github.com/MobilityChoices/mc-android","homepage":null,"size":238,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4"},"html":{"href":"https://github.com/MobilityChoices/mc-android/pull/4"},"issue":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/issues/4"},"comments":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/MobilityChoices/mc-android/statuses/1b28196bc5188ffd16e67a50a328196480ccc4d2"}}}}
{"actor":{"display_login":"optionset"}}