{"action":"created","comment":{"url":"https://api.github.com/repos/Esri/squad-leader-android/pulls/comments/39886988","id":39886988,"diff_hunk":"@@ -76,22 +75,49 @@\n      * @param spotReportIcon the Drawable for putting spot reports on the map.\n      * @param messageController a MessageController, for sending updates when messages are to be removed,\n      *        e.g. in clearLayer or clearAllMessages.\n-     * @throws FileNotFoundException if the advanced symbology database is absent or corrupt.\n+     * @throws IOException if the advanced symbology database is absent or corrupt or cannot be written\n+     *                     to the device.\n      */\n     public AdvancedSymbolController(\n             MapController mapController,\n             AssetManager assetManager,\n             String symbolDictionaryDirname,\n             Drawable spotReportIcon,\n-            MessageController messageController) throws FileNotFoundException {\n+            MessageController messageController) throws IOException {\n         super(mapController);\n         this.mapController = mapController;\n+        symDictDir = copySymbolDictionaryToDisk(assetManager, symbolDictionaryDirname);\n+\n+        spotReportLayer = new GraphicsLayer();\n+        spotReportLayer.setName(SPOT_REPORT_LAYER_NAME);\n+        mapController.addLayer(spotReportLayer);\n+        \n+        groupLayer = new MessageGroupLayer(SymbolDictionary.DictionaryType.MIL2525C, symDictDir.getAbsolutePath());\n+        mapController.addLayer(groupLayer);\n+        \n+        spotReportSymbol = new PictureMarkerSymbol(spotReportIcon);\n+        \n+        this.messageController = messageController;\n+    }\n+\n+    /**\n+     * Copies the MIL-STD-2525C symbol dictionary from assets to the device's downloads directory if\n+     * it is not already there.\n+     * @param assetManager the application's AssetManager, from which the advanced symbology database","path":"source/SquadLeader/app/src/main/java/com/esri/squadleader/controller/AdvancedSymbolController.java","position":67,"original_position":67,"commit_id":"93f765f95768ec0d30816c973a1ea12a633b9725","original_commit_id":"93f765f95768ec0d30816c973a1ea12a633b9725","user":{"login":"garys-esri","id":3091666,"avatar_url":"https://avatars.githubusercontent.com/u/3091666?v=3","gravatar_id":"","url":"https://api.github.com/users/garys-esri","html_url":"https://github.com/garys-esri","followers_url":"https://api.github.com/users/garys-esri/followers","following_url":"https://api.github.com/users/garys-esri/following{/other_user}","gists_url":"https://api.github.com/users/garys-esri/gists{/gist_id}","starred_url":"https://api.github.com/users/garys-esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garys-esri/subscriptions","organizations_url":"https://api.github.com/users/garys-esri/orgs","repos_url":"https://api.github.com/users/garys-esri/repos","events_url":"https://api.github.com/users/garys-esri/events{/privacy}","received_events_url":"https://api.github.com/users/garys-esri/received_events","type":"User","site_admin":false},"body":"mil2525c.dat and the messagetype folder are included in the app as assets. When the app first instantiates AdvancedSymbolController, it checks its private directory on the device to see if mil2525c.dat and messagetype are there. If not, it copies them from app assets. We've been using this code for a while, but I think I moved it around during this refactoring.","created_at":"2015-09-18T18:38:04Z","updated_at":"2015-09-18T18:38:04Z","html_url":"https://github.com/Esri/squad-leader-android/pull/128#discussion_r39886988","pull_request_url":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/Esri/squad-leader-android/pulls/comments/39886988"},"html":{"href":"https://github.com/Esri/squad-leader-android/pull/128#discussion_r39886988"},"pull_request":{"href":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128","id":44839807,"html_url":"https://github.com/Esri/squad-leader-android/pull/128","diff_url":"https://github.com/Esri/squad-leader-android/pull/128.diff","patch_url":"https://github.com/Esri/squad-leader-android/pull/128.patch","issue_url":"https://api.github.com/repos/Esri/squad-leader-android/issues/128","number":128,"state":"open","locked":false,"title":"Adding a GeoMessage file","user":{"login":"garys-esri","id":3091666,"avatar_url":"https://avatars.githubusercontent.com/u/3091666?v=3","gravatar_id":"","url":"https://api.github.com/users/garys-esri","html_url":"https://github.com/garys-esri","followers_url":"https://api.github.com/users/garys-esri/followers","following_url":"https://api.github.com/users/garys-esri/following{/other_user}","gists_url":"https://api.github.com/users/garys-esri/gists{/gist_id}","starred_url":"https://api.github.com/users/garys-esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garys-esri/subscriptions","organizations_url":"https://api.github.com/users/garys-esri/orgs","repos_url":"https://api.github.com/users/garys-esri/repos","events_url":"https://api.github.com/users/garys-esri/events{/privacy}","received_events_url":"https://api.github.com/users/garys-esri/received_events","type":"User","site_admin":false},"body":"Fixes #7 \r\n\r\nTwo ways to add a GeoMessage file:\r\n- mapconfig.xml\r\n- Add Layer button in the app\r\n\r\nThis is all documented in README.md and documentation/UserGuide.md.","created_at":"2015-09-11T23:33:31Z","updated_at":"2015-09-18T18:38:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a69c6d268b8bd6df1ca965996d6fce9df0dba311","assignee":{"login":"csmoore","id":3090809,"avatar_url":"https://avatars.githubusercontent.com/u/3090809?v=3","gravatar_id":"","url":"https://api.github.com/users/csmoore","html_url":"https://github.com/csmoore","followers_url":"https://api.github.com/users/csmoore/followers","following_url":"https://api.github.com/users/csmoore/following{/other_user}","gists_url":"https://api.github.com/users/csmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/csmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csmoore/subscriptions","organizations_url":"https://api.github.com/users/csmoore/orgs","repos_url":"https://api.github.com/users/csmoore/repos","events_url":"https://api.github.com/users/csmoore/events{/privacy}","received_events_url":"https://api.github.com/users/csmoore/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128/commits","review_comments_url":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128/comments","review_comment_url":"https://api.github.com/repos/Esri/squad-leader-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Esri/squad-leader-android/issues/128/comments","statuses_url":"https://api.github.com/repos/Esri/squad-leader-android/statuses/93f765f95768ec0d30816c973a1ea12a633b9725","head":{"label":"garys-esri:master","ref":"master","sha":"93f765f95768ec0d30816c973a1ea12a633b9725","user":{"login":"garys-esri","id":3091666,"avatar_url":"https://avatars.githubusercontent.com/u/3091666?v=3","gravatar_id":"","url":"https://api.github.com/users/garys-esri","html_url":"https://github.com/garys-esri","followers_url":"https://api.github.com/users/garys-esri/followers","following_url":"https://api.github.com/users/garys-esri/following{/other_user}","gists_url":"https://api.github.com/users/garys-esri/gists{/gist_id}","starred_url":"https://api.github.com/users/garys-esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garys-esri/subscriptions","organizations_url":"https://api.github.com/users/garys-esri/orgs","repos_url":"https://api.github.com/users/garys-esri/repos","events_url":"https://api.github.com/users/garys-esri/events{/privacy}","received_events_url":"https://api.github.com/users/garys-esri/received_events","type":"User","site_admin":false},"repo":{"id":17599823,"name":"squad-leader-android","full_name":"garys-esri/squad-leader-android","owner":{"login":"garys-esri","id":3091666,"avatar_url":"https://avatars.githubusercontent.com/u/3091666?v=3","gravatar_id":"","url":"https://api.github.com/users/garys-esri","html_url":"https://github.com/garys-esri","followers_url":"https://api.github.com/users/garys-esri/followers","following_url":"https://api.github.com/users/garys-esri/following{/other_user}","gists_url":"https://api.github.com/users/garys-esri/gists{/gist_id}","starred_url":"https://api.github.com/users/garys-esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garys-esri/subscriptions","organizations_url":"https://api.github.com/users/garys-esri/orgs","repos_url":"https://api.github.com/users/garys-esri/repos","events_url":"https://api.github.com/users/garys-esri/events{/privacy}","received_events_url":"https://api.github.com/users/garys-esri/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garys-esri/squad-leader-android","description":"The Squad Leader template demonstrates best practices for building handheld military applications with ArcGIS.","fork":true,"url":"https://api.github.com/repos/garys-esri/squad-leader-android","forks_url":"https://api.github.com/repos/garys-esri/squad-leader-android/forks","keys_url":"https://api.github.com/repos/garys-esri/squad-leader-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garys-esri/squad-leader-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garys-esri/squad-leader-android/teams","hooks_url":"https://api.github.com/repos/garys-esri/squad-leader-android/hooks","issue_events_url":"https://api.github.com/repos/garys-esri/squad-leader-android/issues/events{/number}","events_url":"https://api.github.com/repos/garys-esri/squad-leader-android/events","assignees_url":"https://api.github.com/repos/garys-esri/squad-leader-android/assignees{/user}","branches_url":"https://api.github.com/repos/garys-esri/squad-leader-android/branches{/branch}","tags_url":"https://api.github.com/repos/garys-esri/squad-leader-android/tags","blobs_url":"https://api.github.com/repos/garys-esri/squad-leader-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garys-esri/squad-leader-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garys-esri/squad-leader-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/garys-esri/squad-leader-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garys-esri/squad-leader-android/statuses/{sha}","languages_url":"https://api.github.com/repos/garys-esri/squad-leader-android/languages","stargazers_url":"https://api.github.com/repos/garys-esri/squad-leader-android/stargazers","contributors_url":"https://api.github.com/repos/garys-esri/squad-leader-android/contributors","subscribers_url":"https://api.github.com/repos/garys-esri/squad-leader-android/subscribers","subscription_url":"https://api.github.com/repos/garys-esri/squad-leader-android/subscription","commits_url":"https://api.github.com/repos/garys-esri/squad-leader-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/garys-esri/squad-leader-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/garys-esri/squad-leader-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/garys-esri/squad-leader-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/garys-esri/squad-leader-android/contents/{+path}","compare_url":"https://api.github.com/repos/garys-esri/squad-leader-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garys-esri/squad-leader-android/merges","archive_url":"https://api.github.com/repos/garys-esri/squad-leader-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garys-esri/squad-leader-android/downloads","issues_url":"https://api.github.com/repos/garys-esri/squad-leader-android/issues{/number}","pulls_url":"https://api.github.com/repos/garys-esri/squad-leader-android/pulls{/number}","milestones_url":"https://api.github.com/repos/garys-esri/squad-leader-android/milestones{/number}","notifications_url":"https://api.github.com/repos/garys-esri/squad-leader-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garys-esri/squad-leader-android/labels{/name}","releases_url":"https://api.github.com/repos/garys-esri/squad-leader-android/releases{/id}","created_at":"2014-03-10T16:35:16Z","updated_at":"2015-05-08T20:08:54Z","pushed_at":"2015-09-11T23:27:14Z","git_url":"git://github.com/garys-esri/squad-leader-android.git","ssh_url":"git@github.com:garys-esri/squad-leader-android.git","clone_url":"https://github.com/garys-esri/squad-leader-android.git","svn_url":"https://github.com/garys-esri/squad-leader-android","homepage":"","size":100667,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Esri:master","ref":"master","sha":"2e709fc909a744246bee7ccaee8421bd3f12a792","user":{"login":"Esri","id":628795,"avatar_url":"https://avatars.githubusercontent.com/u/628795?v=3","gravatar_id":"","url":"https://api.github.com/users/Esri","html_url":"https://github.com/Esri","followers_url":"https://api.github.com/users/Esri/followers","following_url":"https://api.github.com/users/Esri/following{/other_user}","gists_url":"https://api.github.com/users/Esri/gists{/gist_id}","starred_url":"https://api.github.com/users/Esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Esri/subscriptions","organizations_url":"https://api.github.com/users/Esri/orgs","repos_url":"https://api.github.com/users/Esri/repos","events_url":"https://api.github.com/users/Esri/events{/privacy}","received_events_url":"https://api.github.com/users/Esri/received_events","type":"Organization","site_admin":false},"repo":{"id":11204600,"name":"squad-leader-android","full_name":"Esri/squad-leader-android","owner":{"login":"Esri","id":628795,"avatar_url":"https://avatars.githubusercontent.com/u/628795?v=3","gravatar_id":"","url":"https://api.github.com/users/Esri","html_url":"https://github.com/Esri","followers_url":"https://api.github.com/users/Esri/followers","following_url":"https://api.github.com/users/Esri/following{/other_user}","gists_url":"https://api.github.com/users/Esri/gists{/gist_id}","starred_url":"https://api.github.com/users/Esri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Esri/subscriptions","organizations_url":"https://api.github.com/users/Esri/orgs","repos_url":"https://api.github.com/users/Esri/repos","events_url":"https://api.github.com/users/Esri/events{/privacy}","received_events_url":"https://api.github.com/users/Esri/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Esri/squad-leader-android","description":"The Squad Leader template demonstrates best practices for building handheld military applications with ArcGIS.","fork":false,"url":"https://api.github.com/repos/Esri/squad-leader-android","forks_url":"https://api.github.com/repos/Esri/squad-leader-android/forks","keys_url":"https://api.github.com/repos/Esri/squad-leader-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Esri/squad-leader-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Esri/squad-leader-android/teams","hooks_url":"https://api.github.com/repos/Esri/squad-leader-android/hooks","issue_events_url":"https://api.github.com/repos/Esri/squad-leader-android/issues/events{/number}","events_url":"https://api.github.com/repos/Esri/squad-leader-android/events","assignees_url":"https://api.github.com/repos/Esri/squad-leader-android/assignees{/user}","branches_url":"https://api.github.com/repos/Esri/squad-leader-android/branches{/branch}","tags_url":"https://api.github.com/repos/Esri/squad-leader-android/tags","blobs_url":"https://api.github.com/repos/Esri/squad-leader-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Esri/squad-leader-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Esri/squad-leader-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/Esri/squad-leader-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Esri/squad-leader-android/statuses/{sha}","languages_url":"https://api.github.com/repos/Esri/squad-leader-android/languages","stargazers_url":"https://api.github.com/repos/Esri/squad-leader-android/stargazers","contributors_url":"https://api.github.com/repos/Esri/squad-leader-android/contributors","subscribers_url":"https://api.github.com/repos/Esri/squad-leader-android/subscribers","subscription_url":"https://api.github.com/repos/Esri/squad-leader-android/subscription","commits_url":"https://api.github.com/repos/Esri/squad-leader-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/Esri/squad-leader-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/Esri/squad-leader-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/Esri/squad-leader-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/Esri/squad-leader-android/contents/{+path}","compare_url":"https://api.github.com/repos/Esri/squad-leader-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Esri/squad-leader-android/merges","archive_url":"https://api.github.com/repos/Esri/squad-leader-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Esri/squad-leader-android/downloads","issues_url":"https://api.github.com/repos/Esri/squad-leader-android/issues{/number}","pulls_url":"https://api.github.com/repos/Esri/squad-leader-android/pulls{/number}","milestones_url":"https://api.github.com/repos/Esri/squad-leader-android/milestones{/number}","notifications_url":"https://api.github.com/repos/Esri/squad-leader-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Esri/squad-leader-android/labels{/name}","releases_url":"https://api.github.com/repos/Esri/squad-leader-android/releases{/id}","created_at":"2013-07-05T17:15:09Z","updated_at":"2015-08-30T08:48:25Z","pushed_at":"2015-09-11T23:33:32Z","git_url":"git://github.com/Esri/squad-leader-android.git","ssh_url":"git@github.com:Esri/squad-leader-android.git","clone_url":"https://github.com/Esri/squad-leader-android.git","svn_url":"https://github.com/Esri/squad-leader-android","homepage":"","size":100813,"stargazers_count":8,"watchers_count":8,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":36,"forks":13,"open_issues":36,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128"},"html":{"href":"https://github.com/Esri/squad-leader-android/pull/128"},"issue":{"href":"https://api.github.com/repos/Esri/squad-leader-android/issues/128"},"comments":{"href":"https://api.github.com/repos/Esri/squad-leader-android/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/Esri/squad-leader-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Esri/squad-leader-android/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/Esri/squad-leader-android/statuses/93f765f95768ec0d30816c973a1ea12a633b9725"}}}}