<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 26, 2015 at 3:38 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Daniel,<br>
<br>
Thanks for the reply and the diagram.<br>
<br>
We are definitely sending the right project number.<br>
<br>
and here’s the same thing in the UPS console. We’ve obscured the Google Cloud messaging Key. Thats the one thing we are not certain on. Do you mind saying if your GCM Key starts 5xxxxx or AlZa as ours does. The UPS docs are little unclear here.<br></blockquote><div>I can confirm that my keys starts also with AIza , you&#39;re saying that the placeholder in this screenshot <a href="https://aerogear.org/docs/unifiedpush/aerogear-push-android//img/variant_01.png">https://aerogear.org/docs/unifiedpush/aerogear-push-android//img/variant_01.png</a> is confusing ? I agree, let me fill a ticket for that.</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">
<br>
<br>
Rob<span class=""><br>
<br>
<br>
<br>
<br>
On 26 Nov 2015, at 14:27, Daniel Passos wrote:<br>
<br>
</span><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"><span class="">
It&#39;s seems to me some config problem. Are you sure you are using the<br>
correct project number in &quot;senderID&quot; instead of project id?<br>
<br>
<a href="http://monosnap.com/file/QmMAO1JQ4aWynfmatYat66vipsYxjr" rel="noreferrer" target="_blank">http://monosnap.com/file/QmMAO1JQ4aWynfmatYat66vipsYxjr</a><br>
<br>
On Thu, Nov 26, 2015 at 8:24 AM, Rob Willett &lt;<a href="mailto:rob.aerogear@robertwillett.com" target="_blank">rob.aerogear@robertwillett.com</a><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">
wrote:<br>
</blockquote>
<br>
</span><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"><span class="">
Hi,<br>
<br>
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….<br>
<br>
We’ve followed the guide from here<br>
<br>
<br>
<a href="https://aerogear.org/docs/unifiedpush/aerogear-push-android/guides/#troubleshooting" rel="noreferrer" target="_blank">https://aerogear.org/docs/unifiedpush/aerogear-push-android/guides/#troubleshooting</a><br>
<br>
The Google web interface has changed but its still pretty much the same.<br>
<br></span>
1.<span class=""><br>
<br>
We’ve got and logged the Project Number (which is the Sender Id).<br></span>
2.<span class=""><br>
<br>
We’ve created a new server API key (is this the same as the GCM<br>
Messaging key?)<br>
<br>
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 GCM<br>
information but we have unlinked that now.<br>
<br></span>
1.<span class=""><br>
<br>
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 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 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></span>
thought that *might* indicate a different type of key. It also might<span class=""><br>
be nothing at all and Google has simply updated something.<br></span>
2.<span class=""><br>
<br>
We add in the Project number.<br></span>
3.<span class=""><br>
<br>
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, the<br>
Variant ID and the Variant Secret.<br></span>
4.<span class=""><br>
<br>
This seems to work much the same as the iOS variant.<br></span>
5.<span class=""><br>
<br>
We then update our Cordova app and update the pushConfig field.<br>
<br>
             var aeroGearPushConfig = {<br>
                 pushServerURL: &quot;<a href="https://push-jambuster.rhcloud.com/ag-push/" rel="noreferrer" target="_blank">https://push-jambuster.rhcloud.com/ag-push/</a>&quot;, // Checked that this matches the Android variant.<br>
                 ios: {<br>
                     variantID: “XXXXX-TTTc-OOOO-RRRR-BBBHBHBH”, // Obscured<br>
                     variantSecret: “JKJKJ-HHHH-PPOPIO-sdsds-1231232” // Obscured<br>
                 } ,<br>
                 android: {<br>
                     senderID: “XXXXXX” , // Changed to protect the innocent but checked that the senderID is the same as the Google Project Id<br>
                     variantID: “345345-345345-45345-xxxx-zzzzz” , // Changed but checked to make sure this is the Android VariantId<br>
                     variantSecret: &quot;9b762d92-a7f0-4e8b-b6e4-adde4950c7e6&quot; // Changed but checked to make sure this is the Android VariantSecret<br>
                 } ,<br>
                 sendMetricInfo: true,<br>
                 alias: UUID // This is a unique string<br>
             };<br>
<br>
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<br>
<br></span>
1.<span class=""><br>
<br>
When we run the code and inspect the output in Chrome, the aeroGear<br>
Success Handler is called which we hope means success.<br></span>
2.<span class=""><br>
<br>
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></span>
3.<span class=""><br>
<br>
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></span>
4.<span class=""><br>
<br>
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></span>
5.<span class=""><br>
<br>
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 alerts<br>
for the iOS pop up but nothing for the Android version.<br>
<br>
Notification    Receivers    Status    Timestamp<br>
{&quot;ipAddress”:”XX.YY.ZZ.216&quot;,&quot;clientIdentifier&quot;:&quot;A...    3 installations    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<br>
<br>
<br></span>
1.<span class=""><br>
<br>
The main UPS console doesn’t report any errors and it states that 3<br>
installations are registered. We’ve sent 657 notifications since 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 the<br>
iOS devices getting the test message, we are struggling to understand why<br>
the Android wouldn’t.<br></span>
2.<span class=""><br>
<br>
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></span>
3.<div><div class="h5"><br>
<br>
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.<br>
<br>
2015/11/26 05:20:38,528 INFO  [PushNotificationSenderEndpoint] (EJB default - 7) Processing send request with &amp;apos;[alert=Test12, criteria=[aliases=null, deviceTypes=null, categories=null, variants=null], time-to-live=-1]&amp;apos; payload<br>
2015/11/26 05:20:38,530 INFO  [PushNotificationSenderEndpoint] (http-/127.3.204.1:8080-5) Message submitted to PushNetworks for further processing<br>
2015/11/26 05:20:38,533 INFO  [GCMPushNotificationSender] (EJB default - 7) Sending payload for [1] devices to GCM<br>
2015/11/26 05:20:38,590 INFO  [GCMPushNotificationSender] (EJB default - 7) Message to GCM has been submitted<br>
2015/11/26 05:20:38,726 INFO  [APNsPushNotificationSender] (EJB default - 7) Message to APNs has been submitted<br>
<br>
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 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.<br>
<br>
Any and all suggestions gratefully received.<br>
<br>
Thanks<br>
<br>
Rob<br>
<br>
_______________________________________________<br>
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" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br>
<br>
</div></div></blockquote><div><div class="h5">
<br>
<br>
-- <br>
-- Passos<br>
_______________________________________________<br>
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" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</div></div></blockquote>
<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>