{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-native/issues/767","repository_url":"https://api.github.com/repos/driftyco/ionic-native","labels_url":"https://api.github.com/repos/driftyco/ionic-native/issues/767/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-native/issues/767/comments","events_url":"https://api.github.com/repos/driftyco/ionic-native/issues/767/events","html_url":"https://github.com/driftyco/ionic-native/issues/767","id":186950308,"number":767,"title":"BackgroundMode onactivate doesn't work","user":{"login":"JesucristoEsteban","id":23224995,"avatar_url":"https://avatars.githubusercontent.com/u/23224995?v=3","gravatar_id":"","url":"https://api.github.com/users/JesucristoEsteban","html_url":"https://github.com/JesucristoEsteban","followers_url":"https://api.github.com/users/JesucristoEsteban/followers","following_url":"https://api.github.com/users/JesucristoEsteban/following{/other_user}","gists_url":"https://api.github.com/users/JesucristoEsteban/gists{/gist_id}","starred_url":"https://api.github.com/users/JesucristoEsteban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JesucristoEsteban/subscriptions","organizations_url":"https://api.github.com/users/JesucristoEsteban/orgs","repos_url":"https://api.github.com/users/JesucristoEsteban/repos","events_url":"https://api.github.com/users/JesucristoEsteban/events{/privacy}","received_events_url":"https://api.github.com/users/JesucristoEsteban/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-02T23:50:42Z","updated_at":"2016-11-04T12:47:49Z","closed_at":null,"body":"I'm trying to use background mode plugin but it doesn't work.\r\n\r\nHere's the code i'm using:\r\n\r\n\r\n`// Called when background mode has been activated`\r\n`BackgroundMode.onactivate().subscribe(() => {`\r\n`               //Background stuff`\r\n`});`\r\n\r\n`// Enable background mode`\r\n`BackgroundMode.enable();`\r\n\r\nAll my code it's inside the Platform ready event, and i get this error:\r\n\r\n**Error: Uncaught (in promise): TypeError: BackgroundMode.onactivate is not a function**\r\n\r\n¡HELP!"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-native/issues/comments/258422061","html_url":"https://github.com/driftyco/ionic-native/issues/767#issuecomment-258422061","issue_url":"https://api.github.com/repos/driftyco/ionic-native/issues/767","id":258422061,"user":{"login":"ramonornela","id":187946,"avatar_url":"https://avatars.githubusercontent.com/u/187946?v=3","gravatar_id":"","url":"https://api.github.com/users/ramonornela","html_url":"https://github.com/ramonornela","followers_url":"https://api.github.com/users/ramonornela/followers","following_url":"https://api.github.com/users/ramonornela/following{/other_user}","gists_url":"https://api.github.com/users/ramonornela/gists{/gist_id}","starred_url":"https://api.github.com/users/ramonornela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramonornela/subscriptions","organizations_url":"https://api.github.com/users/ramonornela/orgs","repos_url":"https://api.github.com/users/ramonornela/repos","events_url":"https://api.github.com/users/ramonornela/events{/privacy}","received_events_url":"https://api.github.com/users/ramonornela/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T12:47:49Z","updated_at":"2016-11-04T12:47:49Z","body":"Try\r\n```\r\nBackgroundMode.onactivate().subscribe(\r\n        () => {},\r\n        (err) => {\r\n          if (err.error === 'cordova_not_available' || err.error === 'plugin_not_available') {\r\n            console.log('plugin not install');\r\n          }\r\n        }\r\n      );\r\n```\r\n\r\nThanks"}}
{"actor":{"display_login":"ramonornela"}}