Coherent examples given, related to each specific context. That's what I'm
talking about.
Now when I read again what I was looking for previously, I say to myself:
yes, that's obvious...
But when I entered in the Aerogear thing for the first time I thought: what
a mess! :(
That said, your work deserves a big kudos ;)
Carry on!
M
Em 27/02/2014 06:59, "Matthias Wessendorf" <matzew(a)apache.org> escreveu:
On Thu, Feb 27, 2014 at 12:29 AM, Miguel Lemos <miguel21op(a)gmail.com>wrote:
> Yes, I tried it. It's easy.
>
> Do you know, for me, what's one of the biggest - unexpected - hurdle to
> surpass? The information you people give about the URLs to use, etc.; it
> varies according to the platform ("context" for using your terminology).
> For instance, someone that is on Cordova / mobile , must use something
> different from another guy targeting etwas anderes... And for a newbie
> arriving from outside to your ecosystem it's not so easy as you might think.
>
The context is a well defined thing in the Java world (it comes from the
Servlet Spec). I am not really sure hot to name it better :-(
http(s)://server:port/context
But I think that all our docs are using the same 'schema' of the URL (the
OpenShift blog is an outdated announcement, not really documentation).
Where do you think we use the URL totally differently, in our docs (not
the outdated OpenShift blog post) ?
>
> Thanks for your support.
>
You are welcome!
We are all happy that it works, and we are also very much willing to
improve our docs etc.
Thanks for pointing out issues
>
>
> M
>
>
>
>
> On Mon, Feb 24, 2014 at 6:21 PM, Matthias Wessendorf <matzew(a)apache.org>wrote:
>
>>
>>
>>
>> On Mon, Feb 24, 2014 at 7:14 PM, Matthias Wessendorf
<matzew(a)apache.org>wrote:
>>
>>>
>>>
>>>
>>> On Mon, Feb 24, 2014 at 6:36 PM, Miguel Lemos
<miguel21op(a)gmail.com>wrote:
>>>
>>>> That would be neat if I understand a simple way to send a push to a
>>>> particular dude's phone. So far I've not yet understood how...
>>>>
>>>
>>>
>>> use an alias that is *unique* (E.g. the user-id in your backend):
>>>
>>> curl -3 -u "{variantID}:{secret}"
>>> -v -H "Accept: application/json" -H "Content-type:
application/json"
>>> -X POST
>>> -d '{
>>> "deviceToken" : "someTokenString",
>>> "alias" : "myUniqueString"
>>> }'
>>>
>>>
https://SERVER:PORT/context/rest/registry/device
>>>
>>> Now, the above does store this string (the alias ) on the device
>>> metadata.
>>>
>>
>>
>>
>>
>> Oh, since you are using Cordova, I translated the generic curl (from our
>> REST API doc) to JavaScript:
>>
>> var pushConfig = {
>> // senderID is only used in the Android/GCM case
>> senderID: "<senderID e.g Google Project ID only for
android>",
>> pushServerURL: "<pushServerURL e.g http(s)//host:port/context
>",
>> variantID: "<variantID e.g. 1234456-234320>",
>> variantSecret: "<variantSecret e.g. 1234456-234320>",
>>
>>
>> alias: "myUniqueString" // NOTE!! this must be unique to the user.
Do not hard-code that string ;)
>> // Recommendation is: username;
>>
>> // the user logins to your backend system. After a successful login you
should know the username, which can than
>> // be used when the 'JavaScript' for the device registration is being
executed;
>>
>> }
>>
>> //badge and sound are iOS specific, and ignored on Android
>> push.register(successHandler, errorHandler, {"badge": "true",
"sound": "true",
>> "ecb": "onNotification", pushConfig: pushConfig});
>>
>>
>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog:
http://matthiaswessendorf.wordpress.com/
>> sessions:
http://www.slideshare.net/mwessendorf
>> twitter:
http://twitter.com/mwessendorf
>>
>> _______________________________________________
>> aerogear-dev mailing list
>> aerogear-dev(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/aerogear-dev
>>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
--
Matthias Wessendorf
blog:
http://matthiaswessendorf.wordpress.com/
sessions:
http://www.slideshare.net/mwessendorf
twitter:
http://twitter.com/mwessendorf
_______________________________________________
aerogear-dev mailing list
aerogear-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-dev