{"action":"created","issue":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/714","repository_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push","labels_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/714/labels{/name}","comments_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/714/comments","events_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/714/events","html_url":"https://github.com/phonegap/phonegap-plugin-push/pull/714","id":141386044,"number":714,"title":"Feature/default android senderid","user":{"login":"cmprescott","id":4502791,"avatar_url":"https://avatars.githubusercontent.com/u/4502791?v=3","gravatar_id":"","url":"https://api.github.com/users/cmprescott","html_url":"https://github.com/cmprescott","followers_url":"https://api.github.com/users/cmprescott/followers","following_url":"https://api.github.com/users/cmprescott/following{/other_user}","gists_url":"https://api.github.com/users/cmprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/cmprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmprescott/subscriptions","organizations_url":"https://api.github.com/users/cmprescott/orgs","repos_url":"https://api.github.com/users/cmprescott/repos","events_url":"https://api.github.com/users/cmprescott/events{/privacy}","received_events_url":"https://api.github.com/users/cmprescott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-16T20:01:01Z","updated_at":"2016-03-16T20:29:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/pulls/714","html_url":"https://github.com/phonegap/phonegap-plugin-push/pull/714","diff_url":"https://github.com/phonegap/phonegap-plugin-push/pull/714.diff","patch_url":"https://github.com/phonegap/phonegap-plugin-push/pull/714.patch"},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\n\r\n\r\n<!--- Describe your changes in detail -->\r\nStore Android senderID set at installation in the AndroidManifest.xml. Use value in AndroidManifest.xml as the default.\r\n\r\n## Related Issue\r\n<!--- This project only accepts pull requests related to open issues -->\r\n<!--- If suggesting a new feature or change, please discuss it in an issue first -->\r\n<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->\r\n<!--- Please link to the issue here: -->\r\nFixes Issues #689 & #693 without breaking existing usages.\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nAllows other plugins to use this as dependency to automagically get the pushId onDeviceReady\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nIn the test app I ran this code\r\n\r\n```javascript\r\n    onDeviceReady: function() {\r\n        app.receivedEvent('deviceready');\r\n\r\n        var push = PushNotification.init({\r\n            android: {}\r\n        });\r\n\r\n        push.on('registration', function(data) {\r\n            console.log('registrationId: ' + data.registrationId);\r\n        });\r\n\r\n        push.on('notification', function(data) {\r\n            console.log('msg: ' + data.message);\r\n            console.log('title: ' + data.title);\r\n        });\r\n\r\n        push.on('error', function(e) {\r\n            console.log('error: ' + e.message);\r\n        });\r\n    },\r\n```\r\n\r\n## Screenshots (if appropriate):\r\n\r\n![image](https://cloud.githubusercontent.com/assets/4502791/13826771/8d3777b6-eb8f-11e5-9635-c574124abe58.png)\r\n\r\n## Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n- [x] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to change)\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project.\r\n- [ ] My change requires a change to the documentation.\r\n- [ ] I have updated the documentation accordingly.\r\n- [x] I have read the **CONTRIBUTING** document.\r\n- [ ] I have added tests to cover my changes.\r\n- [ ] All new and existing tests passed.\r\n\r\nI could document this new feature, but might be confusing until you decide to deprecate init with senderID in the 2.0 release. So I choose not to."},"comment":{"url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/comments/197534458","html_url":"https://github.com/phonegap/phonegap-plugin-push/pull/714#issuecomment-197534458","issue_url":"https://api.github.com/repos/phonegap/phonegap-plugin-push/issues/714","id":197534458,"user":{"login":"cmprescott","id":4502791,"avatar_url":"https://avatars.githubusercontent.com/u/4502791?v=3","gravatar_id":"","url":"https://api.github.com/users/cmprescott","html_url":"https://github.com/cmprescott","followers_url":"https://api.github.com/users/cmprescott/followers","following_url":"https://api.github.com/users/cmprescott/following{/other_user}","gists_url":"https://api.github.com/users/cmprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/cmprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmprescott/subscriptions","organizations_url":"https://api.github.com/users/cmprescott/orgs","repos_url":"https://api.github.com/users/cmprescott/repos","events_url":"https://api.github.com/users/cmprescott/events{/privacy}","received_events_url":"https://api.github.com/users/cmprescott/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T20:29:09Z","updated_at":"2016-03-16T20:29:09Z","body":"It is. I unsuccessfully tried several other ways to store it. Getting from strings.xml runs into problems with each app has a different namespace & that would require some messy plugin hooks. I tried to figure out CordovaPreferences, but those don't seem documented for this kind of use. I also thought about switching to using the 'google-services.json' file, but that seemed like too big a change to incorporate into a `.` release."}}