[aerogear-dev] Issues with Aerogear on Cordova

Miguel Lemos miguel21op at gmail.com
Wed Feb 19 04:53:14 EST 2014


Hello,

1 > The Openshift explanation:

https://www.openshift.com/blogs/mobile-push-simplified-with-the-aerogear-push-server-on-openshift

2 >  I insist: the documentation / examples you give about the correct URLs
to use is incoherent and not enough clear (sorry, this is my opinion);

3 > The Android version I use on the testing device: 4.2.1 and Cordova 3.3

4 > As I told you  in my previous post the device registers correctly,
meaning there is a token, etc of it on the server. See picture attached;

5> Yes there is an account, etc on Google service, where the Google cloud
Messaging for Android is set to on (if you want I can send to you the
credentials; later on I'll generate new ones);

6 > Please see attached the libraries I'm using on my Android app;

7 >  The Javascript code inside my app:

document.addEventListener('deviceready', function(){

    var pushConfig = {                      // credentials not real; I
thing this goes live...
          senderID: "278695548260",
          pushServerURL: "https://aerogear-metalpush.rhcloud.com",
          variantID: "821460c5-ez9f-41d8-903a-61e7bd132038",
          variantSecret: "43b0e5e4-f217-4f29-b15b-85f8f5748ee6"
        }

    try {
      push.register(successHandler, errorHandler, {"badge": "true",
"sound": "true",
        "alert": "true", "ecb": "onNotification", pushConfig: pushConfig});

    } catch (err) {
      txt = "Erro encontrado.\n\n";
      txt += "Descrição do erro: " + err.message + "\n\n";
      alert(txt);
    }

    function successHandler(result) {
     var respush = document.getElementById("pushst");
     respush.innerHTML = "Notificações: registo efetuado";
  }

  function errorHandler(error) {
    var respush = document.getElementById("pushst");
     respush.innerHTML = "Notificções: registo falhado";
  }

  function onNotification(e) {
    alert(e.alert);
  }

}, false);


I think I'm answering to all your questions. Any help appreciated.
Feel free to ask whatever you need to enlighten this situation.

Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140219/df94c735/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: token.jpg
Type: image/jpeg
Size: 17661 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140219/df94c735/attachment-0002.jpg 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libraries.jpg
Type: image/jpeg
Size: 12802 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140219/df94c735/attachment-0003.jpg 


More information about the aerogear-dev mailing list