So that means my original idea for the file to get copied by the plugin as a static resource is out of the question. The other way to do this is by using a plugin hook [1], before the plugin gets installed we can fetch the google-services.json file from the www folder and put it in the android platform folder and if it's not there say that they need to create / generate it before they can use the plugin.

WDYT?


[1] https://cordova.apache.org/docs/en/latest/guide/appdev/hooks/#plugin-hooks-pluginxml

On Thu, Jun 9, 2016 at 2:04 PM, Summers Pittman <supittma@redhat.com> wrote:


On Thu, Jun 9, 2016 at 2:19 AM, Erik Jan de Wit <edewit@redhat.com> wrote:

I am now actually wondering, where to put the google-service.json file on Cordova (no I am not updating our plugin), but I have no clue what is matching the native 'app' folder in Crodova land, is it WWW foldeR? 


hrm...
 

There is no native folder on a cordova project, but we can put something in the plugin.xml that will install / copy it into the native project:

<resource-file src="src/android/google-services.json" target="google-services.json" />

Don't know what the content is of this file seems the https://github.com/jboss-mobile/unified-push-helloworld/pull/31 demo doesn't have this google-services.json

Correct.  The documentation is being updated to cover the fact the developer needs to add the file.  If the file is not present the developer gets a useful error message in his/her log when registration fails.  If the file is present but incorrect (as say a stubbed file) then then developer gets a less useful message.  We chose to leave it out because it is more clear what the problem is, and a quick google search for "google-services.json" takes the user exactly where they need to go.
 


--
Cheers,
       Erik Jan

_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
aerogear-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Cheers,
       Erik Jan