{"action":"created","comment":{"url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/comments/48475491","id":48475491,"diff_hunk":"@@ -0,0 +1,44 @@\n+package com.vantuz.compass.app;\n+\n+import android.app.Activity;\n+import android.content.Context;\n+import android.hardware.Sensor;\n+import android.hardware.SensorEvent;\n+import android.hardware.SensorEventListener;\n+import android.hardware.SensorManager;\n+import android.os.Bundle;\n+import android.view.Menu;\n+import android.view.MenuItem;\n+\n+public class MainActivity extends Activity implements SensorEventListener {\n+    SensorManager manager;\n+    private Sensor sensor;\n+    private CompassView compass;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+\n+        manager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);\n+        sensor = manager.getDefaultSensor(Sensor.TYPE_MAGNETIC_FIELD);\n+        if (sensor != null){\n+            setContentView(R.layout.layout_sensor);\n+            compass = (CompassView) findViewById(R.id.compass);\n+            manager.registerListener(this, sensor, SensorManager.SENSOR_DELAY_UI);\n+        }\n+        else {\n+            setContentView(R.layout.layout_ochen_zhal);","path":"app/src/main/java/com/vantuz/compass/app/MainActivity.java","position":30,"original_position":30,"commit_id":"4f941443eb683716aa6cdb6d2a9dab5631a36a0a","original_commit_id":"4f941443eb683716aa6cdb6d2a9dab5631a36a0a","user":{"login":"HighFlyer13","id":2953187,"avatar_url":"https://avatars.githubusercontent.com/u/2953187?v=3","gravatar_id":"","url":"https://api.github.com/users/HighFlyer13","html_url":"https://github.com/HighFlyer13","followers_url":"https://api.github.com/users/HighFlyer13/followers","following_url":"https://api.github.com/users/HighFlyer13/following{/other_user}","gists_url":"https://api.github.com/users/HighFlyer13/gists{/gist_id}","starred_url":"https://api.github.com/users/HighFlyer13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HighFlyer13/subscriptions","organizations_url":"https://api.github.com/users/HighFlyer13/orgs","repos_url":"https://api.github.com/users/HighFlyer13/repos","events_url":"https://api.github.com/users/HighFlyer13/events{/privacy}","received_events_url":"https://api.github.com/users/HighFlyer13/received_events","type":"User","site_admin":false},"body":"Картинка ochen_zhal.png - улёт!","created_at":"2015-12-28T11:54:13Z","updated_at":"2015-12-28T11:54:13Z","html_url":"https://github.com/IFMO-Android-2015/homework4/pull/50#discussion_r48475491","pull_request_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/comments/48475491"},"html":{"href":"https://github.com/IFMO-Android-2015/homework4/pull/50#discussion_r48475491"},"pull_request":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50","id":54606738,"html_url":"https://github.com/IFMO-Android-2015/homework4/pull/50","diff_url":"https://github.com/IFMO-Android-2015/homework4/pull/50.diff","patch_url":"https://github.com/IFMO-Android-2015/homework4/pull/50.patch","issue_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues/50","number":50,"state":"open","locked":false,"title":"HW4","user":{"login":"Vantuz","id":12038613,"avatar_url":"https://avatars.githubusercontent.com/u/12038613?v=3","gravatar_id":"","url":"https://api.github.com/users/Vantuz","html_url":"https://github.com/Vantuz","followers_url":"https://api.github.com/users/Vantuz/followers","following_url":"https://api.github.com/users/Vantuz/following{/other_user}","gists_url":"https://api.github.com/users/Vantuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantuz/subscriptions","organizations_url":"https://api.github.com/users/Vantuz/orgs","repos_url":"https://api.github.com/users/Vantuz/repos","events_url":"https://api.github.com/users/Vantuz/events{/privacy}","received_events_url":"https://api.github.com/users/Vantuz/received_events","type":"User","site_admin":false},"body":"Крайнов Виталий\r\n![screenshot](https://pp.vk.me/c628823/v628823028/2b8b9/0dfZUpKPCSQ.jpg)","created_at":"2015-12-26T20:02:27Z","updated_at":"2015-12-28T11:54:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c153caef30dfa4b1affb7675d8b73b67865a827","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50/commits","review_comments_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50/comments","review_comment_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues/50/comments","statuses_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/statuses/4f941443eb683716aa6cdb6d2a9dab5631a36a0a","head":{"label":"Vantuz:master","ref":"master","sha":"4f941443eb683716aa6cdb6d2a9dab5631a36a0a","user":{"login":"Vantuz","id":12038613,"avatar_url":"https://avatars.githubusercontent.com/u/12038613?v=3","gravatar_id":"","url":"https://api.github.com/users/Vantuz","html_url":"https://github.com/Vantuz","followers_url":"https://api.github.com/users/Vantuz/followers","following_url":"https://api.github.com/users/Vantuz/following{/other_user}","gists_url":"https://api.github.com/users/Vantuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantuz/subscriptions","organizations_url":"https://api.github.com/users/Vantuz/orgs","repos_url":"https://api.github.com/users/Vantuz/repos","events_url":"https://api.github.com/users/Vantuz/events{/privacy}","received_events_url":"https://api.github.com/users/Vantuz/received_events","type":"User","site_admin":false},"repo":{"id":48615392,"name":"homework4","full_name":"Vantuz/homework4","owner":{"login":"Vantuz","id":12038613,"avatar_url":"https://avatars.githubusercontent.com/u/12038613?v=3","gravatar_id":"","url":"https://api.github.com/users/Vantuz","html_url":"https://github.com/Vantuz","followers_url":"https://api.github.com/users/Vantuz/followers","following_url":"https://api.github.com/users/Vantuz/following{/other_user}","gists_url":"https://api.github.com/users/Vantuz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vantuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vantuz/subscriptions","organizations_url":"https://api.github.com/users/Vantuz/orgs","repos_url":"https://api.github.com/users/Vantuz/repos","events_url":"https://api.github.com/users/Vantuz/events{/privacy}","received_events_url":"https://api.github.com/users/Vantuz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vantuz/homework4","description":"Компас","fork":true,"url":"https://api.github.com/repos/Vantuz/homework4","forks_url":"https://api.github.com/repos/Vantuz/homework4/forks","keys_url":"https://api.github.com/repos/Vantuz/homework4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vantuz/homework4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vantuz/homework4/teams","hooks_url":"https://api.github.com/repos/Vantuz/homework4/hooks","issue_events_url":"https://api.github.com/repos/Vantuz/homework4/issues/events{/number}","events_url":"https://api.github.com/repos/Vantuz/homework4/events","assignees_url":"https://api.github.com/repos/Vantuz/homework4/assignees{/user}","branches_url":"https://api.github.com/repos/Vantuz/homework4/branches{/branch}","tags_url":"https://api.github.com/repos/Vantuz/homework4/tags","blobs_url":"https://api.github.com/repos/Vantuz/homework4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vantuz/homework4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vantuz/homework4/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vantuz/homework4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vantuz/homework4/statuses/{sha}","languages_url":"https://api.github.com/repos/Vantuz/homework4/languages","stargazers_url":"https://api.github.com/repos/Vantuz/homework4/stargazers","contributors_url":"https://api.github.com/repos/Vantuz/homework4/contributors","subscribers_url":"https://api.github.com/repos/Vantuz/homework4/subscribers","subscription_url":"https://api.github.com/repos/Vantuz/homework4/subscription","commits_url":"https://api.github.com/repos/Vantuz/homework4/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vantuz/homework4/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vantuz/homework4/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vantuz/homework4/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vantuz/homework4/contents/{+path}","compare_url":"https://api.github.com/repos/Vantuz/homework4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vantuz/homework4/merges","archive_url":"https://api.github.com/repos/Vantuz/homework4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vantuz/homework4/downloads","issues_url":"https://api.github.com/repos/Vantuz/homework4/issues{/number}","pulls_url":"https://api.github.com/repos/Vantuz/homework4/pulls{/number}","milestones_url":"https://api.github.com/repos/Vantuz/homework4/milestones{/number}","notifications_url":"https://api.github.com/repos/Vantuz/homework4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vantuz/homework4/labels{/name}","releases_url":"https://api.github.com/repos/Vantuz/homework4/releases{/id}","created_at":"2015-12-26T15:36:45Z","updated_at":"2015-12-26T19:53:12Z","pushed_at":"2015-12-26T20:00:13Z","git_url":"git://github.com/Vantuz/homework4.git","ssh_url":"git@github.com:Vantuz/homework4.git","clone_url":"https://github.com/Vantuz/homework4.git","svn_url":"https://github.com/Vantuz/homework4","homepage":null,"size":211,"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":"IFMO-Android-2015:master","ref":"master","sha":"0cf032a36d2d7616bbb0a2cc159581d66c9f8c92","user":{"login":"IFMO-Android-2015","id":15182437,"avatar_url":"https://avatars.githubusercontent.com/u/15182437?v=3","gravatar_id":"","url":"https://api.github.com/users/IFMO-Android-2015","html_url":"https://github.com/IFMO-Android-2015","followers_url":"https://api.github.com/users/IFMO-Android-2015/followers","following_url":"https://api.github.com/users/IFMO-Android-2015/following{/other_user}","gists_url":"https://api.github.com/users/IFMO-Android-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/IFMO-Android-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IFMO-Android-2015/subscriptions","organizations_url":"https://api.github.com/users/IFMO-Android-2015/orgs","repos_url":"https://api.github.com/users/IFMO-Android-2015/repos","events_url":"https://api.github.com/users/IFMO-Android-2015/events{/privacy}","received_events_url":"https://api.github.com/users/IFMO-Android-2015/received_events","type":"User","site_admin":false},"repo":{"id":45971155,"name":"homework4","full_name":"IFMO-Android-2015/homework4","owner":{"login":"IFMO-Android-2015","id":15182437,"avatar_url":"https://avatars.githubusercontent.com/u/15182437?v=3","gravatar_id":"","url":"https://api.github.com/users/IFMO-Android-2015","html_url":"https://github.com/IFMO-Android-2015","followers_url":"https://api.github.com/users/IFMO-Android-2015/followers","following_url":"https://api.github.com/users/IFMO-Android-2015/following{/other_user}","gists_url":"https://api.github.com/users/IFMO-Android-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/IFMO-Android-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IFMO-Android-2015/subscriptions","organizations_url":"https://api.github.com/users/IFMO-Android-2015/orgs","repos_url":"https://api.github.com/users/IFMO-Android-2015/repos","events_url":"https://api.github.com/users/IFMO-Android-2015/events{/privacy}","received_events_url":"https://api.github.com/users/IFMO-Android-2015/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IFMO-Android-2015/homework4","description":"Компас","fork":false,"url":"https://api.github.com/repos/IFMO-Android-2015/homework4","forks_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/forks","keys_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/teams","hooks_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/hooks","issue_events_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues/events{/number}","events_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/events","assignees_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/assignees{/user}","branches_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/branches{/branch}","tags_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/tags","blobs_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/git/refs{/sha}","trees_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/statuses/{sha}","languages_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/languages","stargazers_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/stargazers","contributors_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/contributors","subscribers_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/subscribers","subscription_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/subscription","commits_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/commits{/sha}","git_commits_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/git/commits{/sha}","comments_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/comments{/number}","issue_comment_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues/comments{/number}","contents_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/contents/{+path}","compare_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/merges","archive_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/downloads","issues_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues{/number}","pulls_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls{/number}","milestones_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/milestones{/number}","notifications_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/labels{/name}","releases_url":"https://api.github.com/repos/IFMO-Android-2015/homework4/releases{/id}","created_at":"2015-11-11T09:07:40Z","updated_at":"2015-11-11T09:07:40Z","pushed_at":"2015-12-27T23:43:53Z","git_url":"git://github.com/IFMO-Android-2015/homework4.git","ssh_url":"git@github.com:IFMO-Android-2015/homework4.git","clone_url":"https://github.com/IFMO-Android-2015/homework4.git","svn_url":"https://github.com/IFMO-Android-2015/homework4","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":63,"forks":65,"open_issues":63,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50"},"html":{"href":"https://github.com/IFMO-Android-2015/homework4/pull/50"},"issue":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues/50"},"comments":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/IFMO-Android-2015/homework4/statuses/4f941443eb683716aa6cdb6d2a9dab5631a36a0a"}}}}