<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 26, 2015 at 4:09 PM, Rob Willett <span dir="ltr">&lt;<a href="mailto:rob.aerogear@robertwillett.com" target="_blank">rob.aerogear@robertwillett.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<p dir="auto">Sebastien,</p>

<p dir="auto">Thats good to know that your key starts the same as mine. Can I suggest that we have a standard name for what this key is?</p>

<p dir="auto">The docs refer to ‘Client ID’, ‘Server Key’ and ‘Google Cloud Messaging Key’</p>

<p dir="auto">”In the Wizard after you create a PushApplication, click the Add Variant button and fill out the Android options. You will want to use the <strong><em>Client ID</em></strong> and Project Number from the Google API Console in their appropriate fields:”</p>

<p dir="auto">“On the last screen we are finally get to see the actual value of the generated <strong><em>Server Key</em></strong>, which we will use later:”</p>

<p dir="auto">‘Google Cloud Messaging Key’ is on the dialogue box that pops up when you create the Android Variant.</p>

<p dir="auto">I think that ‘Client ID’, ‘Server Key’ and ‘Google Cloud Messaging Key’ are actually all the same key, the one created in this attachment</p>

<p dir="auto">Are they all the same k,ey?</p></div></blockquote><div>Yes there are and you are right it&#39;s really confusing, I add a comment to the existing ticket about the  doc polishing</div><div>Thx again. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>

<p dir="auto">Rob</p><div><div class="h5">

<p dir="auto">On 26 Nov 2015, at 14:45, Sebastien Blanc wrote:</p>

</div></div><blockquote><div><div class="h5">
<p dir="auto">On Thu, Nov 26, 2015 at 3:38 PM, Rob Willett &lt;<a href="mailto:rob.aerogear@robertwillett.com" target="_blank">rob.aerogear@robertwillett.com</a></p>

<blockquote>
<p dir="auto">wrote:</p>

<p dir="auto">Daniel,</p>

<p dir="auto">Thanks for the reply and the diagram.</p>

<p dir="auto">We are definitely sending the right project number.</p>

<p dir="auto">and here’s the same thing in the UPS console. We’ve obscured the Google<br>
Cloud messaging Key. Thats the one thing we are not certain on. Do you mind<br>
saying if your GCM Key starts 5xxxxx or AlZa as ours does. The UPS docs are<br>
little unclear here.</p>
</blockquote>

<p dir="auto">I can confirm that my keys starts also with AIza , you&#39;re saying that the<br>
placeholder in this screenshot<br>
<a href="https://aerogear.org/docs/unifiedpush/aerogear-push-android//img/variant_01.png" target="_blank">https://aerogear.org/docs/unifiedpush/aerogear-push-android//img/variant_01.png</a><br>
is confusing ? I agree, let me fill a ticket for that.</p>

</div></div><blockquote><div><div class="h5">
<p dir="auto">Rob</p>

<p dir="auto">On 26 Nov 2015, at 14:27, Daniel Passos wrote:</p>

<p dir="auto">It&#39;s seems to me some config problem. Are you sure you are using the</p>

</div></div><blockquote><div><div class="h5">
<p dir="auto">correct project number in &quot;senderID&quot; instead of project id?</p>

<p dir="auto"><a href="http://monosnap.com/file/QmMAO1JQ4aWynfmatYat66vipsYxjr" target="_blank">http://monosnap.com/file/QmMAO1JQ4aWynfmatYat66vipsYxjr</a></p>

<p dir="auto">On Thu, Nov 26, 2015 at 8:24 AM, Rob Willett &lt;<br>
<a href="mailto:rob.aerogear@robertwillett.com" target="_blank">rob.aerogear@robertwillett.com</a></p>

<blockquote>
<p dir="auto">wrote:</p>
</blockquote>

<p dir="auto">Hi,</p>

</div></div><blockquote><div><div class="h5">
<p dir="auto">We’ve got iOS notifications working well and so we thought we’d push our<br>
luck and get Android notifications up and running. We’ve had them working<br>
before with another plugin so it can’t be that difficult….</p>

<p dir="auto">We’ve followed the guide from here</p>

<p dir="auto"><a href="https://aerogear.org/docs/unifiedpush/aerogear-push-android/guides/#troubleshooting" target="_blank">https://aerogear.org/docs/unifiedpush/aerogear-push-android/guides/#troubleshooting</a></p>

<p dir="auto">The Google web interface has changed but its still pretty much the same.</p>

<p dir="auto">1.</p>

<p dir="auto">We’ve got and logged the Project Number (which is the Sender Id).<br>
2.</p>

<p dir="auto">We’ve created a new server API key (is this the same as the GCM<br>
Messaging key?)</p>

<p dir="auto">This appears to be all thats needed. We have an very old version of our<br>
app sitting in development in the Google Play Store but its never been<br>
released as we focussed on the iOS version. That used to linked to the<br>
GCM<br>
information but we have unlinked that now.</p>

<p dir="auto">1.</p>

</div></div><p dir="auto"></p><div><div class="h5">We have created a new variant on the UPS for Android. We create a<br>
name, description and where it asks for the Google Cloud Messaging Key we<br>
enter the Server API key we created in point 2. This is a bit we are<br>
unclear about, is the google Cloud Messaging Key the same as the Server<br>
API<br>
key we generated in Google Play services console? One of the things we<br>
noticed is that the example Google Cloud Messaging Key in the UPS<br>
dialogue<br>
box starts with a different few header bytes e.g. 5a44 whereas all the<br>
Server ApI keys start Alza. We are not experts on cryptography but we<br></div></div>
thought that <em>might</em> indicate a different type of key. It also might<div><div class="h5"><br>
be nothing at all and Google has simply updated something.<br>
2.</div></div><p></p><div><div class="h5">

<p dir="auto">We add in the Project number.<br>
3.</p>

<p dir="auto">This creates the Android variant in the UPS dashboard. If we click on<br>
the variant we can see the expanded information showing the Server URL,<br>
the<br>
Variant ID and the Variant Secret.<br>
4.</p>

<p dir="auto">This seems to work much the same as the iOS variant.<br>
5.</p>

<p dir="auto">We then update our Cordova app and update the pushConfig field.</p>

<pre><code> var aeroGearPushConfig = {
     pushServerURL: &quot;
</code></pre>

<p dir="auto"><a href="https://push-jambuster.rhcloud.com/ag-push/" target="_blank">https://push-jambuster.rhcloud.com/ag-push/</a>&quot;, // Checked that this<br>
matches the Android variant.<br>
         ios: {<br>
             variantID: “XXXXX-TTTc-OOOO-RRRR-BBBHBHBH”, //<br>
Obscured<br>
             variantSecret: “JKJKJ-HHHH-PPOPIO-sdsds-1231232” //<br>
Obscured<br>
         } ,<br>
         android: {<br>
             senderID: “XXXXXX” , // Changed to protect the<br>
innocent but checked that the senderID is the same as the Google Project Id<br>
             variantID: “345345-345345-45345-xxxx-zzzzz” , //<br>
Changed but checked to make sure this is the Android VariantId<br>
             variantSecret:<br>
&quot;9b762d92-a7f0-4e8b-b6e4-adde4950c7e6&quot; // Changed but checked to make sure<br>
this is the Android VariantSecret<br>
         } ,<br>
         sendMetricInfo: true,<br>
         alias: UUID // This is a unique string<br>
     };</p>

<p dir="auto">We compile and run it on a real device, a Nexus 5. We create a unique<br>
alias to be sent to be sent as the alias. This is the UUID field</p>

<p dir="auto">1.</p>

<p dir="auto">When we run the code and inspect the output in Chrome, the aeroGear<br>
Success Handler is called which we hope means success.<br>
2.</p>

<p dir="auto">When we inspect the variant in the UPS dashboard, we can see that the<br>
a device with the right alias is created. The alias matches the alias we<br>
sent.<br>
3.</p>

<p dir="auto">This all looks good. We have three real (i.e. non simulator) test<br>
devices in our UPS dashboard, two iOS devices and one Android device.<br>
4.</p>

<p dir="auto">We click on the Send Push icon in the UPS dashboard to create some<br>
sample notifications. We send a simple test message to all variants. The<br>
two iPhones each get the test message and the Android phone doesn’t.<br>
5.</p>

<p dir="auto">We click on the Dashboard icon in the UPS console, and then recent<br>
activity. We can see that the UPS server thinks it has sent the test<br>
message to the iOS and the Android variants. with no issues. We get<br>
alerts<br>
for the iOS pop up but nothing for the Android version.</p>

<p dir="auto">Notification    Receivers    Status    Timestamp<br>
{&quot;ipAddress”:”XX.YY.ZZ.216&quot;,&quot;clientIdentifier&quot;:&quot;A...    3 installations<br>
Succeeded    26 Nov, 10:09:04, 2015<br>
Request IP:    XX.YY.ZZ.216    Details<br>
Message:    test11<br>
Variants:<br>
Android Jambuster    Succeeded    1 installations<br>
Jambuster Development    Succeeded    2 installations</p>

<p dir="auto">1.</p>

<p dir="auto">The main UPS console doesn’t report any errors and it states that 3<br>
installations are registered. We’ve sent 657 notifications since<br>
yesterday<br>
trying to see what the problem is. We though that using the UPS console<br>
removed any issues with us creating the test message. Since we can see<br>
the<br>
iOS devices getting the test message, we are struggling to understand why<br>
the Android wouldn’t.<br>
2.</p>

<p dir="auto">We’ve tried with the Android app running in the foreground, background<br>
and not running at all to see if that makes any difference and still<br>
nothing comes through.<br>
3.</p>

<p dir="auto">If we look at the log files using roc tail, we can see that the<br>
messages get passed on. No error messages are reported.</p>

</div></div><p dir="auto">2015/11/26 05:20:38,528 INFO  <a href="http://EJB%0Adefault%20-%207" target="_blank">PushNotificationSenderEndpoint</a> Processing send request with &#39;[alert=Test12,<span class=""><br>
criteria=[aliases=null, deviceTypes=null, categories=null, variants=null],<br></span>
time-to-live=-1]&#39; payload<br>
2015/11/26 05:20:38,530 INFO  <a href="http://http-/127.3.204.1:8080-5" target="_blank">PushNotificationSenderEndpoint</a> Message submitted to PushNetworks for<br>
further processing<br>
2015/11/26 05:20:38,533 INFO  <a href="http://EJB%20default%20-%0A7" target="_blank">GCMPushNotificationSender</a> Sending payload for [1] devices to GCM<br>
2015/11/26 05:20:38,590 INFO  <a href="http://EJB%20default%20-%0A7" target="_blank">GCMPushNotificationSender</a> Message to GCM has been submitted<br>
2015/11/26 05:20:38,726 INFO  <a href="http://EJB%20default%0A-%207" target="_blank">APNsPushNotificationSender</a> Message to APNs has been submitted</p><span class="">

<p dir="auto">Whilst it is impossible for people to debug our code and we don’t want<br>
people to, we’re struggling to understand what we could have done wrong.<br>
The fact we are getting iOS messages through whilst Android messages are<br>
failing (but with no error) is perplexing. We have rebuild the Server API<br>
kets in Google, deleted and rebuilt the Android variant but we’ve now<br>
hit a<br>
brick wall. We have a nagging feeling it is something to do with the GCM<br>
Server API key but everything reports OK.</p>

<p dir="auto">Any and all suggestions gratefully received.</p>

<p dir="auto">Thanks</p>

<p dir="auto">Rob</p>

<hr>

</span><p dir="auto">Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a></p>
</blockquote><span class="">

<p dir="auto">--<br>
-- Passos</p>

<hr>

<p dir="auto">Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a></p>
</span></blockquote><span class="">

<hr>

<p dir="auto">Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a></p>
</span></blockquote><span class="">

<hr>

<p dir="auto">Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org" target="_blank">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a></p>
</span></blockquote>

</div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br></div></div>