{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/2875","repository_url":"https://api.github.com/repos/realm/realm-java","labels_url":"https://api.github.com/repos/realm/realm-java/issues/2875/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/2875/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/2875/events","html_url":"https://github.com/realm/realm-java/issues/2875","id":156723281,"number":2875,"title":"Detect when adding a ChangeListener on an IntentService","user":{"login":"cmelchior","id":406066,"avatar_url":"https://avatars.githubusercontent.com/u/406066?v=3","gravatar_id":"","url":"https://api.github.com/users/cmelchior","html_url":"https://github.com/cmelchior","followers_url":"https://api.github.com/users/cmelchior/followers","following_url":"https://api.github.com/users/cmelchior/following{/other_user}","gists_url":"https://api.github.com/users/cmelchior/gists{/gist_id}","starred_url":"https://api.github.com/users/cmelchior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmelchior/subscriptions","organizations_url":"https://api.github.com/users/cmelchior/orgs","repos_url":"https://api.github.com/users/cmelchior/repos","events_url":"https://api.github.com/users/cmelchior/events{/privacy}","received_events_url":"https://api.github.com/users/cmelchior/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/S:P2%20Backlog","name":"S:P2 Backlog","color":"dedede"},{"url":"https://api.github.com/repos/realm/realm-java/labels/T:Enhancement","name":"T:Enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-25T11:08:25Z","updated_at":"2016-05-31T09:55:11Z","closed_at":null,"body":"IntentServices are Looper Threads, which means that Realm currently allow you to register change listeners there. However since every invocation of `onHandleIntent` is a single event. Registering a change listener will not work, since the Realm should be closed when exiting `onHandleIntent`.\r\n\r\nWe might be able to implement a heuristic that checks if the current thread is named `IntentServicer[XXX]` the same way we test for Looper threads now, and throw an exception in that case:\r\n\r\nhttps://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/IntentService.java#108"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/222643888","html_url":"https://github.com/realm/realm-java/issues/2875#issuecomment-222643888","issue_url":"https://api.github.com/repos/realm/realm-java/issues/2875","id":222643888,"user":{"login":"beeender","id":449296,"avatar_url":"https://avatars.githubusercontent.com/u/449296?v=3","gravatar_id":"","url":"https://api.github.com/users/beeender","html_url":"https://github.com/beeender","followers_url":"https://api.github.com/users/beeender/followers","following_url":"https://api.github.com/users/beeender/following{/other_user}","gists_url":"https://api.github.com/users/beeender/gists{/gist_id}","starred_url":"https://api.github.com/users/beeender/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beeender/subscriptions","organizations_url":"https://api.github.com/users/beeender/orgs","repos_url":"https://api.github.com/users/beeender/repos","events_url":"https://api.github.com/users/beeender/events{/privacy}","received_events_url":"https://api.github.com/users/beeender/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T09:55:11Z","updated_at":"2016-05-31T09:55:11Z","body":"@evansgelist Can you share your project or a minimal project which can reproduce this issue? To help@realm.io\r\n\r\nThanks!"}}
{"actor":{"display_login":"beeender"}}