[aerogear-dev] Sndroid Background push notifications not working
Sebastien Blanc
scm.blanc at gmail.com
Tue Jun 2 16:36:04 EDT 2015
On Tue, Jun 2, 2015 at 10:24 PM, delalis <delalis at gmail.com> wrote:
> So please correct me if I am wrong...
>
> if we call register() and set our Java REST service in the config, we
> will need to take the payload passed into the REST service, parse out the
> device token (which you said is sent there automatically), and send that to
> Aerogear using the method we are already currently using to register device
> tokens with Aerogear in the Service? (since the REST service can talk to
> the UPS)
>
> is this correct??
>
Yes :)
But you can also keep the payload as is and just pass it to the UPS
endpoint (since it's already the payload he expects)
>
> On Tue, Jun 2, 2015 at 4:20 PM, Sebastien Blanc [via aerogear-dev] <[hidden
> email] <http:///user/SendEmail.jtp?type=node&node=11744&i=0>> wrote:
>
>> You don't have to worry about that :) the AeroGear push plugin will
>> already include the device token in the payload, in fact you don't have to
>> worry at all about the payload, just call register()
>>
>> On Tue, Jun 2, 2015 at 10:16 PM, delalis <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=11743&i=0>> wrote:
>>
>>> ah okay. I didnt think of putting the REST service in the config. But
>>> then what would we pass to the REST service as the device token to pass to
>>> aerogear in the subsequent Java call? in the classic push plugin, the
>>> onsuccess(event) came back with a device token that we would then send to
>>> the REST service to register with Aerogear using a Java call.
>>>
>>> On Tue, Jun 2, 2015 at 4:11 PM, Sebastien Blanc [via aerogear-dev] <[hidden
>>> email] <http:///user/SendEmail.jtp?type=node&node=11741&i=0>> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Jun 2, 2015 at 9:51 PM, delalis <[hidden email]
>>>> <http:///user/SendEmail.jtp?type=node&node=11739&i=0>> wrote:
>>>>
>>>>> Thanks for writing back so quickly!
>>>>>
>>>>> 1) Can't your "Leatons" REST Service proxy the register request to
>>>>> the push
>>>>> server ?
>>>>>
>>>>> ---Yes that is what we were doing before, the classic push plugin
>>>>> called
>>>>> register() which simply registered the token with APNS/GCM, and in the
>>>>> onSuccess function we would then send an AJAX call to Leatons REST
>>>>> service
>>>>> which would then put the device token we got back from the register()
>>>>> call
>>>>> into the Aerogear database using whatever methods Aerogears API exposed
>>>>> (sorry, I think that is what I meant by the Sender API)... so if you
>>>>> suggest
>>>>> using the REST service as a proxy to the push server and bypass the
>>>>> register() function altogether, how would we hook up the client
>>>>> onNotification() handler?
>>>>>
>>>>> 2) Or maybe just let Leaton accept the register request made by the
>>>>> aerogear
>>>>> plugin and store the json payload, later a service can submit that to
>>>>> the
>>>>> UnifiedPush Server.
>>>>> ---Again, how would we hook up the phonegap client onNotification()
>>>>> handler
>>>>> if we arent calling register from the clients javascript code??
>>>>>
>>>>
>>>> I meant : you still use the plugin javascript code register() but just
>>>> make sure that your backend API (Leaton or whatever) accept the path and
>>>> the json payload so :
>>>>
>>>> POST http//myleatonservice/rest/registry/device + JSON Payload
>>>>
>>>> You just point to "http//myleatonservice/rest" in you push-config,
>>>> "/registry/device" will be added automatically by the plugin.
>>>>
>>>> Could sound hacky but worth to explore.
>>>>
>>>> This way you still hookup your onNotification() handler
>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11737.html
>>>>> Sent from the aerogear-dev mailing list archive at Nabble.com.
>>>>> _______________________________________________
>>>>> aerogear-dev mailing list
>>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=11739&i=1>
>>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> aerogear-dev mailing list
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=11739&i=2>
>>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>>>> discussion below:
>>>>
>>>> http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11739.html
>>>> To unsubscribe from Android Background push notifications not working, click
>>>> here.
>>>> NAML
>>>> <http://aerogear-dev.1069024.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>>
>>>
>>> ------------------------------
>>> View this message in context: Re: [aerogear-dev] Sndroid Background
>>> push notifications not working
>>> <http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11741.html>
>>>
>>> Sent from the aerogear-dev mailing list archive
>>> <http://aerogear-dev.1069024.n5.nabble.com/> at Nabble.com.
>>>
>>> _______________________________________________
>>> aerogear-dev mailing list
>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=11743&i=1>
>>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>>
>>
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=11743&i=2>
>> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11743.html
>> To unsubscribe from Android Background push notifications not working, click
>> here.
>> NAML
>> <http://aerogear-dev.1069024.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: [aerogear-dev] Sndroid Background push
> notifications not working
> <http://aerogear-dev.1069024.n5.nabble.com/Android-Background-push-notifications-not-working-tp11716p11744.html>
> Sent from the aerogear-dev mailing list archive
> <http://aerogear-dev.1069024.n5.nabble.com/> at Nabble.com.
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20150602/49524cee/attachment-0001.html
More information about the aerogear-dev
mailing list