{"action":"created","issue":{"url":"https://api.github.com/repos/privat/nit/issues/1208","labels_url":"https://api.github.com/repos/privat/nit/issues/1208/labels{/name}","comments_url":"https://api.github.com/repos/privat/nit/issues/1208/comments","events_url":"https://api.github.com/repos/privat/nit/issues/1208/events","html_url":"https://github.com/privat/nit/pull/1208","id":62479652,"number":1208,"title":"Intro NitActivity an Android entry point in pure Nit, Java, and C (almost no NDK)","user":{"login":"xymus","id":208057,"avatar_url":"https://avatars.githubusercontent.com/u/208057?v=3","gravatar_id":"","url":"https://api.github.com/users/xymus","html_url":"https://github.com/xymus","followers_url":"https://api.github.com/users/xymus/followers","following_url":"https://api.github.com/users/xymus/following{/other_user}","gists_url":"https://api.github.com/users/xymus/gists{/gist_id}","starred_url":"https://api.github.com/users/xymus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xymus/subscriptions","organizations_url":"https://api.github.com/users/xymus/orgs","repos_url":"https://api.github.com/users/xymus/repos","events_url":"https://api.github.com/users/xymus/events{/privacy}","received_events_url":"https://api.github.com/users/xymus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/privat/nit/labels/need_review","name":"need_review","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-17T18:36:02Z","updated_at":"2015-03-18T12:41:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/privat/nit/pulls/1208","html_url":"https://github.com/privat/nit/pull/1208","diff_url":"https://github.com/privat/nit/pull/1208.diff","patch_url":"https://github.com/privat/nit/pull/1208.patch"},"body":"This PR could be described in 3 steps.\r\n\r\n* Clean up lib/android and move up `dalvik` in the module hierarchy.\r\n* Intro NitActivity.java (the most important commit)\r\n* Update calculator (only) to use the new NitActivity with all its perks.\r\n\r\nSee the doc of the nit_activity module for the details on the polyglot implementation, copied hre for your convenience:\r\n\r\nThis module is implemented in 3 languages:\r\n\r\n* The Java code, in `NitActivity.java` acts as the entry point registered\r\n   to the Android OS. It relays most of the Android callbacks to C.\r\n   In theory, there may be more than one instance of `NitActivity` alive at\r\n   a given time. They hold a reference to the corresponding Nit `Activity`\r\n   in the attribute `nitActivity`.\r\n\r\n* The C code is defined in the top part of this source file. It acts as a\r\n   glue between Java and Nit by relaying calls between both languages.\r\n   It keeps a global variables reference to the Java VM and the Nit `App`.\r\n\r\n* The Nit code defines the `Activity` class with the callbacks from Android.\r\n   The callback methods should be redefined by user modules."},"comment":{"url":"https://api.github.com/repos/privat/nit/issues/comments/82952743","html_url":"https://github.com/privat/nit/pull/1208#issuecomment-82952743","issue_url":"https://api.github.com/repos/privat/nit/issues/1208","id":82952743,"user":{"login":"xymus","id":208057,"avatar_url":"https://avatars.githubusercontent.com/u/208057?v=3","gravatar_id":"","url":"https://api.github.com/users/xymus","html_url":"https://github.com/xymus","followers_url":"https://api.github.com/users/xymus/followers","following_url":"https://api.github.com/users/xymus/following{/other_user}","gists_url":"https://api.github.com/users/xymus/gists{/gist_id}","starred_url":"https://api.github.com/users/xymus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xymus/subscriptions","organizations_url":"https://api.github.com/users/xymus/orgs","repos_url":"https://api.github.com/users/xymus/repos","events_url":"https://api.github.com/users/xymus/events{/privacy}","received_events_url":"https://api.github.com/users/xymus/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T12:41:45Z","updated_at":"2015-03-18T12:41:45Z","body":"Rerolled to improve doc, and add `Activity::on_restart`."}}