{"action":"created","issue":{"url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/issues/1","repository_url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk","labels_url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/issues/1/comments","events_url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/issues/1/events","html_url":"https://github.com/Appboy/appboy-cordova-sdk/pull/1","id":132473055,"number":1,"title":"Configuring the plugin via params","user":{"login":"lurecas","id":4138011,"avatar_url":"https://avatars.githubusercontent.com/u/4138011?v=3","gravatar_id":"","url":"https://api.github.com/users/lurecas","html_url":"https://github.com/lurecas","followers_url":"https://api.github.com/users/lurecas/followers","following_url":"https://api.github.com/users/lurecas/following{/other_user}","gists_url":"https://api.github.com/users/lurecas/gists{/gist_id}","starred_url":"https://api.github.com/users/lurecas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lurecas/subscriptions","organizations_url":"https://api.github.com/users/lurecas/orgs","repos_url":"https://api.github.com/users/lurecas/repos","events_url":"https://api.github.com/users/lurecas/events{/privacy}","received_events_url":"https://api.github.com/users/lurecas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-09T16:58:25Z","updated_at":"2016-02-10T17:23:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/pulls/1","html_url":"https://github.com/Appboy/appboy-cordova-sdk/pull/1","diff_url":"https://github.com/Appboy/appboy-cordova-sdk/pull/1.diff","patch_url":"https://github.com/Appboy/appboy-cordova-sdk/pull/1.patch"},"body":"As we are working on a Cordova (mainly Android) hybrid app and we want to integrate our product with Appboy, we began to develop a plugin to do so. But this came out yesterday and certainly saved our day.\r\n\r\nWe have been working a while with Cordova and some plugins and the only thing that we missed was the possibility of integrating the plugin on the app without having to fork/download it. \r\n\r\nInspired on the configuration capabilities of this plugin : https://github.com/smistry-toushay/cordova-crashlytics-plugin , we've mimicked the mechanism to do so.\r\n\r\nTo install the plugin you now would do\r\n```bash\r\ncordova plugin add https://github.com/Appboy/appboy-cordova-sdk --variable APPBOY_API_KEY=\"$YOUR_API_KEY\" --variable APPBOY_PUSH_REGISTRATION_ENABLED=\"false/true\" --variable APPBOY_GCM_SENDER_ID=\"$YOUR_SENDER_ID\"\r\n```\r\n\r\nBasically, we run a hook to detect when the plugin have been added to modify the base `appboy.xml` file with the values that the user inputs at install time. We will also edit the `$PACKAGE_NAME` on the `AppboyBroadcastReceiver.java` via the same hook.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/issues/comments/182490793","html_url":"https://github.com/Appboy/appboy-cordova-sdk/pull/1#issuecomment-182490793","issue_url":"https://api.github.com/repos/Appboy/appboy-cordova-sdk/issues/1","id":182490793,"user":{"login":"briancaw","id":314779,"avatar_url":"https://avatars.githubusercontent.com/u/314779?v=3","gravatar_id":"","url":"https://api.github.com/users/briancaw","html_url":"https://github.com/briancaw","followers_url":"https://api.github.com/users/briancaw/followers","following_url":"https://api.github.com/users/briancaw/following{/other_user}","gists_url":"https://api.github.com/users/briancaw/gists{/gist_id}","starred_url":"https://api.github.com/users/briancaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briancaw/subscriptions","organizations_url":"https://api.github.com/users/briancaw/orgs","repos_url":"https://api.github.com/users/briancaw/repos","events_url":"https://api.github.com/users/briancaw/events{/privacy}","received_events_url":"https://api.github.com/users/briancaw/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T17:23:43Z","updated_at":"2016-02-10T17:23:43Z","body":"Hey again @lurecas - do you know if there's a way to get cordova to recognize that the plugin is in a subdirectory?  It seems to want to find the plugin.xml in the root of the repo and is failing because it's not there.  i.e.  `cordova plugin add https://github.com/cabify/appboy-cordova-sdk --variable APPBOY_API_KEY=\"7ef72382-b92f-4258-9be9-9e19e92f3bf1\" --variable APPBOY_PUSH_REGISTRATION_ENABLED=“true\" --variable APPBOY_GCM_SENDER_ID=“7ef72382-b92f-4258-9be9-9e19e92f3bf1\"` is failing.\r\n\r\nNo worries if not, I think it's probably simple enough to move the plugin or the plugin.xml up a directory.  Thanks."}}