{"action":"created","issue":{"url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt/issues/9","repository_url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt","labels_url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt/issues/9/comments","events_url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt/issues/9/events","html_url":"https://github.com/arcoirislabs/cordova-plugin-mqtt/issues/9","id":149906476,"number":9,"title":"Running the plugin in background","user":{"login":"stoiKris","id":9612572,"avatar_url":"https://avatars.githubusercontent.com/u/9612572?v=3","gravatar_id":"","url":"https://api.github.com/users/stoiKris","html_url":"https://github.com/stoiKris","followers_url":"https://api.github.com/users/stoiKris/followers","following_url":"https://api.github.com/users/stoiKris/following{/other_user}","gists_url":"https://api.github.com/users/stoiKris/gists{/gist_id}","starred_url":"https://api.github.com/users/stoiKris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoiKris/subscriptions","organizations_url":"https://api.github.com/users/stoiKris/orgs","repos_url":"https://api.github.com/users/stoiKris/repos","events_url":"https://api.github.com/users/stoiKris/events{/privacy}","received_events_url":"https://api.github.com/users/stoiKris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-20T22:40:08Z","updated_at":"2016-04-21T21:24:56Z","closed_at":null,"body":"Hello. First of all, let me say that this plugin is really useful for mobile, since by default, the MQTT protocol has such a low overhead, and prioritizes the battery life of the device.\r\nHowever, I was wondering if there is any official support for running the plugin in background, and keeping the tcp socket open while the main cordova application is sleeping ?\r\n\r\nAlso, as a side note, how difficult would be to implement the plugin for IOS ? I understand that there are certain limitation with calling C++ methods ( PAHO MQTT ) from Objective-C ( such as not working over cellular mobile )"},"comment":{"url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt/issues/comments/213119869","html_url":"https://github.com/arcoirislabs/cordova-plugin-mqtt/issues/9#issuecomment-213119869","issue_url":"https://api.github.com/repos/arcoirislabs/cordova-plugin-mqtt/issues/9","id":213119869,"user":{"login":"stoiKris","id":9612572,"avatar_url":"https://avatars.githubusercontent.com/u/9612572?v=3","gravatar_id":"","url":"https://api.github.com/users/stoiKris","html_url":"https://github.com/stoiKris","followers_url":"https://api.github.com/users/stoiKris/followers","following_url":"https://api.github.com/users/stoiKris/following{/other_user}","gists_url":"https://api.github.com/users/stoiKris/gists{/gist_id}","starred_url":"https://api.github.com/users/stoiKris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoiKris/subscriptions","organizations_url":"https://api.github.com/users/stoiKris/orgs","repos_url":"https://api.github.com/users/stoiKris/repos","events_url":"https://api.github.com/users/stoiKris/events{/privacy}","received_events_url":"https://api.github.com/users/stoiKris/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T21:24:56Z","updated_at":"2016-04-21T21:24:56Z","body":"Ok, thank you very much.\r\n\r\nThe think is, by letting the plugin run in background, you allow your application to use notifications while it's idle, and I don't really see a a downside, since MQTT doesn't use too much battery or mobile traffic.\r\n\r\nAnd you can also let the any notifications be handled by the cordova app ( templating, localization, etc ), instead of moving it to the MQTT broker"}}