<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 18, 2016 at 7:01 PM, Summers Pittman <span dir="ltr"><<a href="mailto:supittma@redhat.com" target="_blank">supittma@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">See JIRA : <a href="https://issues.jboss.org/browse/AGDROID-473" target="_blank">https://issues.jboss.org/browse/AGDROID-473</a></div></blockquote><div><br></div><div>Played w/ that file today as well :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Background : Currently we have a developer manually enter the Google Project ID to enable push messages in their application. However, this approach is considered "legacy" from Google's POV and they are encouraging consuming the Google-services.json file.</div><div><br></div><div>There are two ways we can consume this file. The first is to parse it manually and extract the key "project_info/project_number"[1]. </div></div></blockquote><div><br></div><div>That's sounds most safe thing, and it's safe, according to Google :) </div><div>In case the "project_number" is not present (e.g. dev is 'smart' and edits file), let's have a proper error and call it a day :-) </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> The second is to have the developer add the google services plugin to their Gradle projects and then we can consume the key from the resources with the field "R.string.gcm_defaultSenderId". <br></div><div><br></div><div>I would prefer to parse the file manually. It make our code less reliant on Google's tools and it allows our users to choose if they will use Google's plug in for its other features. </div></div></blockquote><div><br></div><div>Yeah, I feel same, might be also a bit odd to rely on a plugin, just for this...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div> However, Google's plugin may provide extra features or validation which may be useful in the future.</div></div></blockquote><div><br></div><div>Sure, comes time, we can see :) </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div><br></div><div>Wdyt?</div><div><br></div><div>Summers</div><div><br></div><div>1: This is a documented value described in this section : <a href="https://developers.google.com/android/guides/google-services-plugin#processing_the_json_file" target="_blank">https://developers.google.com/android/guides/google-services-plugin#processing_the_json_file</a></div></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div></div>