Differences between Firefox OS "native" Push lib and AeroGear's Push adapter
by Sebastien Blanc
Hi,
While playing today with my Firefox Device and its native Simple Push
support I noticed some differences between our implementation and the
native Push regarding the success callback after a register :
//Native FFOS Push
broadcastRequest = navigator.push.register();
broadcastRequest.onsuccess = function (event) {
broadcastEndpoint = broadcastRequest.result; // only contains the pushURL
}
//Aerogear Push Adapter
broadcastRequest = navigator.push.register();
broadcastRequest.onsuccess = function (event) {
broadcastEndpoint = broadcastRequest.result.pushEndpoint;
channelID = broadcastRequest.result.channelID;
version = broadcastRequest.result.version;
status = broadcastRequest.result.status
}
So, the AeroGear Push exposes much more in the callback that it should
suppose to do : just exposing the pushEndpoint.
The reason we do that I suppose, but Luke or Kris could confirm that, is
that we thought respecting the SPS protocol, which indeed returns a whole
object containing all the info. It is just that the Native Push Client API
filter that out in the callback response.
After discussing that on the #push channel with the Mozilla people they
confirmed me that we should only expoe the pushEndpoint.
If we keep it as is, this can be problematic when we want to use the same
code both for native and with the adapter when, for instance, registering
to the UPS :
broadcastRequest = navigator.push.register();
broadcastRequest.onsuccess = function (event) {
broadcastEndpoint = event.target.result;
var broadCastSettings = {
metadata: {
deviceToken: broadcastEndpoint.channelID,
simplePushEndpoint: broadcastEndpoint.pushEndpoint
}
}
UPClient.registerWithPushServer(broadCastSettings);
}
This won't work with the native push since "broadcastEndpoint.channelID"
will be undefined.
So I propose that we change the behaviour, to return only the pushEndpoint
in the callback, even if that means a bit of String manipulation when we
want to perform the registration to the UPS :
var broadCastSettings = {
metadata: {
deviceToken:
broadcastEndpoint.substr(broadcastEndpoint.lastIndexOf('/') + 1),
simplePushEndpoint: broadcastEndpoint
}
}
wdyt ?
Seb
ps : our SPS Server implementation stays correct and returns what should be
returned, it's really just the client part and how we expose the result
10 years, 4 months
New docs got merged (was: Re: Docs: update on the UPS docs)
by Matthias Wessendorf
Hi,
the new "push" landing page and restructuring went into our master branch.
* http://staging.aerogear.org/push - the 'Learn More' now redirects to:
** http://staging.aerogear.org/docs/unifiedpush/
That contains all UPS/Push related docs on a more centralized page.
It also contains the new 'User/Reference Guide' on the UnifiedPush Server:
http://staging.aerogear.org/docs/unifiedpush/ups_userguide/
feel free to review and sent PRs/JIRAs for 'bugs' or improvements!
Thanks!
-Matthias
On Wed, Jul 30, 2014 at 4:39 PM, Matthias Wessendorf <matzew(a)apache.org>
wrote:
> A lot of more content.
>
> Please review, and comment on the PR if this can be merged or not ....
>
>
> On Tue, Jul 29, 2014 at 6:48 PM, Matthias Wessendorf <matzew(a)apache.org>
> wrote:
>
>> Here is a first PR for it:
>>
>> https://github.com/aerogear/aerogear.org/pull/333
>>
>> as noted, still WIP - but it is getting there
>>
>>
>> On Thu, Jul 24, 2014 at 3:25 PM, Matthias Wessendorf <matzew(a)apache.org>
>> wrote:
>>
>>> Thanks Dan!
>>>
>>>
>>> FYI - the draft of the TOC (and soon content) lives in this branch:
>>>
>>>
>>> https://github.com/aerogear/aerogear.org/blob/NewUPS_Guide/docs/unifiedpu...
>>>
>>> -M
>>>
>>>
>>> On Thu, Jul 24, 2014 at 2:14 PM, Daniel Bevenius <
>>> daniel.bevenius(a)gmail.com> wrote:
>>>
>>>> Looks good!
>>>> perhaps change: Configuring and Managing Applications that use the
>>>> UnifiedPush Server -> Configuring and managing applications that use
>>>> the UnifiedPush Server
>>>>
>>>>
>>>>
>>>> On 24 July 2014 13:32, Matthias Wessendorf <matzew(a)apache.org> wrote:
>>>>
>>>>> update:
>>>>>
>>>>>
>>>>> UnifiedPush Server User Guide
>>>>>
>>>>> - Overview
>>>>> - About the UnifiedPush Server
>>>>> - Use-cases and scenarios
>>>>> - Useful Terminology
>>>>> - How the UnifiedPush Server Works
>>>>> - Installation and configuration
>>>>> - The WAR file distribution
>>>>> - setup and configure a database
>>>>> - deploy the WAR files
>>>>> - Running on OpenShift
>>>>> - create an instance using OpenShift's Web UI
>>>>> - create an instance using OpenShift's command line interface
>>>>> - Using the Admin UI
>>>>> - Administering the UnifiedPush Server Console
>>>>> - Configuring and Managing Applications that use the
>>>>> UnifiedPush Server
>>>>> - Preparing mobile devices to be connected with the UnifiedPush
>>>>> Server
>>>>> - Sending Push Notifications
>>>>> - Preparing backends to send Push Notifications
>>>>> - Next steps
>>>>> - TBD: Links to tutorials and specs (some specs might go away)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jul 24, 2014 at 1:29 PM, Matthias Wessendorf <
>>>>> matzew(a)apache.org> wrote:
>>>>>
>>>>>> Here is the TOC that I have in mind (and started to work on):
>>>>>>
>>>>>> UnifiedPush Server User Guide
>>>>>>
>>>>>> - Overview
>>>>>> - About the UnifiedPush Server
>>>>>> - Use-cases and scenarios
>>>>>> - Useful Terminology
>>>>>> - How the UnifiedPush Server Works
>>>>>> - Installation and configuration
>>>>>> - The WAR file distribution
>>>>>> - setup and configure a database
>>>>>> - deploy the WAR files
>>>>>> - Running on OpenShift
>>>>>> - create an instance using OpenShift's Web UI
>>>>>> - create an instance using OpenShift's command line interface
>>>>>> - Using the Admin UI
>>>>>> - Administering the UnifiedPush Server Console
>>>>>> - Configuring and Managing Applications that use the
>>>>>> UnifiedPush Server
>>>>>> - Preparing mobile devices to be connected with the
>>>>>> UnifiedPush Server
>>>>>> - Sending Push Notifications
>>>>>> - Next steps
>>>>>> - TBD: Links to tutorials and specs (some specs might go away)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Jul 24, 2014 at 11:26 AM, Matthias Wessendorf <
>>>>>> matzew(a)apache.org> wrote:
>>>>>>
>>>>>>> Before actually starting with the (initial) rewrite of the UPS guide
>>>>>>> (as I outlined), I did the re-org of the UPS content.
>>>>>>>
>>>>>>> Please review:
>>>>>>> https://github.com/aerogear/aerogear.org/pull/327
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jul 21, 2014 at 5:59 PM, Matthias Wessendorf <
>>>>>>> matzew(a)apache.org> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> right now we have a lot of different 'documentation files', like
>>>>>>>> the README, some specs, and guides and tutorials.
>>>>>>>>
>>>>>>>> I'd like to restructure that a bit and centralize the documentation
>>>>>>>> a bit.
>>>>>>>>
>>>>>>>> On the "push" landing page ([1]), I'd like to change the "Lean
>>>>>>>> More" link to a new page that has all the UPS centric documentations
>>>>>>>>
>>>>>>>> - AeroGear UnifiedPush Server User/Reference Guide
>>>>>>>> - Tutorials
>>>>>>>>
>>>>>>>>
>>>>>>>> <https://gist.github.com/matzew/333f101b036336d96891#aerogear-unifiedpush-...>AeroGear
>>>>>>>> UnifiedPush Server User/Reference Guide
>>>>>>>>
>>>>>>>> - Overview
>>>>>>>> - some generic information
>>>>>>>> - Installation and configuration
>>>>>>>> - what's needed (e.g. JBoss and a database)
>>>>>>>> - Running on OpenShift
>>>>>>>> - using the UI on OpenShift
>>>>>>>> - using the rhc command line
>>>>>>>> - Using the Admin UI
>>>>>>>> - doing an overhaul of our existing Admin UI guide (e.g.
>>>>>>>> taking new screenshots and updating based on new UI features)
>>>>>>>>
>>>>>>>> The format of the *reference guide* would be similar to the one
>>>>>>>> from Keycloak ([2]). But... I will continue using asciidoc ;-)
>>>>>>>>
>>>>>>>> The README will be extremely quick and simply link to the homepage
>>>>>>>> ;-) After this *new* reference guide, I think some of the current
>>>>>>>> specs can be removed, as the *reference guide* hopefully covers
>>>>>>>> all of their content :-)
>>>>>>>>
>>>>>>>> For the RESTful APIs, I have to look what Keycloak did to get
>>>>>>>> something like:
>>>>>>>> http://docs.jboss.org/keycloak/docs/1.0-beta-3/rest-api/overview-index.html
>>>>>>>>
>>>>>>>> After the work as been completed, I will be revisiting the specs
>>>>>>>> and evaluate their need ;-)
>>>>>>>> <https://gist.github.com/matzew/333f101b036336d96891#tutorials>
>>>>>>>> Tutorials
>>>>>>>>
>>>>>>>> This section will contain links to all the different tutorials we
>>>>>>>> have:
>>>>>>>>
>>>>>>>> - http://aerogear.org/docs/guides/aerogear-push-ios/
>>>>>>>> - http://aerogear.org/docs/guides/aerogear-push-js/
>>>>>>>> - http://aerogear.org/docs/guides/aerogear-push-android/
>>>>>>>> - http://aerogear.org/docs/guides/aerogear-push-chrome/
>>>>>>>> - http://aerogear.org/docs/guides/GetStartedwithJavaSender/
>>>>>>>>
>>>>>>>> For Cordova we will have one single document, instead of three:
>>>>>>>>
>>>>>>>> - http://aerogear.org/docs/guides/aerogear-push-cordova-android/
>>>>>>>> - http://aerogear.org/docs/guides/aerogear-push-cordova-ios/
>>>>>>>> -
>>>>>>>> http://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/
>>>>>>>>
>>>>>>>> There is already a JIRA for that ([4]).
>>>>>>>>
>>>>>>>> To make it more clear (or clean?), I will remove the UPS/Push
>>>>>>>> related docs from our guides ([3]) and replace all those links by a single
>>>>>>>> link to the above mentioned new page (also referenced from [1]).
>>>>>>>>
>>>>>>>> Greetings,
>>>>>>>> Matthias
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> - [1] http://aerogear.org/push/
>>>>>>>> - [2]
>>>>>>>> http://docs.jboss.org/keycloak/docs/1.0-beta-3/userguide/html/index.html
>>>>>>>> - [3] http://aerogear.org/docs/guides/
>>>>>>>> - [4] https://issues.jboss.org/browse/AGPUSH-805
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Matthias Wessendorf
>>>>>>>>
>>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Matthias Wessendorf
>>>>>>>
>>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Matthias Wessendorf
>>>>>>
>>>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>>>> sessions: http://www.slideshare.net/mwessendorf
>>>>>> twitter: http://twitter.com/mwessendorf
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 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
>>>
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
10 years, 4 months
Modularizing the Android Library
by Summers Pittman
Earlier in development (pre passos) making the Android SDK into modules
was not a concern (in fact it was an anti-concern).
Now, however, we have a much more complete project and it is time to
have that discussion.
Right now we have two BIG questions:
1) Do we want to break out interfaces and implementation?
If we do this then we could reuse a lot of code to make a aerogear-java
as well.
2) How granular do we want our modules?
IE If we break out push into aerogear-android-push would that include
GCM, SimplePush, MQTT, etc in one package or would it look like
aerogear-android-push-core, aerogear-android-push-mqtt etc.
Thoughts?
--
Summers Pittman
>>Phone:404 941 4698
>>Java is my crack.
10 years, 4 months
SimplePush sync with MOz
by Lucas Holmquist
so this sort of relates to this thread here:
http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-Differences-betwee...
from https://developer.mozilla.org/en-US/docs/Web/API/Simple_Push_API#Add_the_...
Moz example
window.navigator.mozSetMessageHandler('push', function(e) {
console.log('My endpoint is ' + e.pushEndpoint);
console.log('My new version is ' + e.version);
//Remember that you can handle here if you have more than
//one pushEndpoint
if (e.pushEndpoint === emailEndpoint) {
emailHandler(e.version);
} else if (e.pushEndpoint === imEndpoint) {
imHandler(e.version);
}
});
The notification that they send back includes the pushEndpoint and the version
Currently, when we do navigator.push.register() the result we send back is an object that includes the pushEndpoint, this is actually changing to be more in line with Mozilla. Instead of the object being sent back, we will send back the pushEndpoint as a String. <--- is a super easy change that sebi already did, just need to re-merge it back in
but in our message handler, our notification that is sent back includes the channelId and version
I believe the server should now be sending the pushEndpoint in the notification instead.
I'd do it myself, but you know, it's java
10 years, 4 months
Docs: update on the UPS docs
by Matthias Wessendorf
Hi,
right now we have a lot of different 'documentation files', like the
README, some specs, and guides and tutorials.
I'd like to restructure that a bit and centralize the documentation a bit.
On the "push" landing page ([1]), I'd like to change the "Lean More" link
to a new page that has all the UPS centric documentations
- AeroGear UnifiedPush Server User/Reference Guide
- Tutorials
<https://gist.github.com/matzew/333f101b036336d96891#aerogear-unifiedpush-...>AeroGear
UnifiedPush Server User/Reference Guide
- Overview
- some generic information
- Installation and configuration
- what's needed (e.g. JBoss and a database)
- Running on OpenShift
- using the UI on OpenShift
- using the rhc command line
- Using the Admin UI
- doing an overhaul of our existing Admin UI guide (e.g. taking new
screenshots and updating based on new UI features)
The format of the *reference guide* would be similar to the one from
Keycloak ([2]). But... I will continue using asciidoc ;-)
The README will be extremely quick and simply link to the homepage ;-)
After this *new* reference guide, I think some of the current specs can be
removed, as the *reference guide* hopefully covers all of their content :-)
For the RESTful APIs, I have to look what Keycloak did to get something
like:
http://docs.jboss.org/keycloak/docs/1.0-beta-3/rest-api/overview-index.html
After the work as been completed, I will be revisiting the specs and
evaluate their need ;-)
<https://gist.github.com/matzew/333f101b036336d96891#tutorials>Tutorials
This section will contain links to all the different tutorials we have:
- http://aerogear.org/docs/guides/aerogear-push-ios/
- http://aerogear.org/docs/guides/aerogear-push-js/
- http://aerogear.org/docs/guides/aerogear-push-android/
- http://aerogear.org/docs/guides/aerogear-push-chrome/
- http://aerogear.org/docs/guides/GetStartedwithJavaSender/
For Cordova we will have one single document, instead of three:
- http://aerogear.org/docs/guides/aerogear-push-cordova-android/
- http://aerogear.org/docs/guides/aerogear-push-cordova-ios/
- http://aerogear.org/docs/guides/aerogear-cordova/AerogearCordovaPush/
There is already a JIRA for that ([4]).
To make it more clear (or clean?), I will remove the UPS/Push related docs
from our guides ([3]) and replace all those links by a single link to the
above mentioned new page (also referenced from [1]).
Greetings,
Matthias
- [1] http://aerogear.org/push/
- [2]
http://docs.jboss.org/keycloak/docs/1.0-beta-3/userguide/html/index.html
- [3] http://aerogear.org/docs/guides/
- [4] https://issues.jboss.org/browse/AGPUSH-805
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
10 years, 4 months
Beta1 of the UnifiedPush Server 1.0.0 released
by Matthias Wessendorf
Today we are announcing the first beta release of our 1.0.0 version. After
the big overhaul, including a brand new AdminUI with the last release
<http://matthiaswessendorf.wordpress.com/2014/07/07/unifiedpush-0-11/> this
release contains several enhancements:
- iOS8 interactive notification support
- increased APNs payload (2k)
- Pagination for analytics
- improved callback for details on actual push delivery
- optimisations and improvements
The complete list of included items are avialble on our JIRA instance
<https://issues.jboss.org/browse/AGPUSH/fixforversion/12323753>.
<https://gist.github.com/matzew/a87119d5c480cb357b24#ios8-interactive-noti...>iOS8
interactive notifications
Besides the work on the server, we have updated our Java
<https://github.com/aerogear/aerogear-unifiedpush-java-client> and Node.js
<https://github.com/aerogear/aerogear-unifiedpush-nodejs-client> sender
libraries to support the new iOS8 interactive notification message format.
If you curious about iOS8 notifications, Corinne Krych
<https://twitter.com/corinnekrych> has a detailed blog post
<http://corinnekrych.blogspot.fr/2014/07/ios8-interactive-notification-ava...>
on
it and how to use it with the AeroGear UnifiedPush Server.
<https://gist.github.com/matzew/a87119d5c480cb357b24#swift-support-for-ios>Swift
support for iOS
On the iOS client side Corinne Krych and Christos Vasilakis
<https://twitter.com/cvasilak> were also busy starting some Swift work: our
iOS registration SDK supports swift on this branch
<https://github.com/aerogear/aerogear-push-ios-registration/tree/swift>. To
give you an idea how it looks, here is some code:
func application(application: UIApplication!,
didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData!)
{
// setup registration
let registration =
AGDeviceRegistration(serverURL: NSURL(string: "<# URL of the running
AeroGear UnifiedPush Server #>"))
// attemp to register
registration.registerWithClientInfo({ (clientInfo:
AGClientDeviceInformation!) in
// setup configuration
clientInfo.deviceToken = deviceToken
clientInfo.variantID = "<# Variant Id #>"
clientInfo.variantSecret = "<# Variant Secret #>"
// apply the token, to identify THIS device
let currentDevice = UIDevice()
// --optional config--
// set some 'useful' hardware information params
clientInfo.operatingSystem = currentDevice.systemName
clientInfo.osVersion = currentDevice.systemVersion
clientInfo.deviceType = currentDevice.model
},
success: {
println("UnifiedPush Server registration succeeded")
},
failure: {(error: NSError!) in
println("failed to register, error: \(error.description)")
})}
<https://gist.github.com/matzew/a87119d5c480cb357b24#demos>Demos
To get easily started using the UnifiedPush Server we have a bunch of
demos, supporting various client platforms:
- Android
- Apache Cordova (with jQuery and Angular/Ionic)
- iOS
The simple HelloWorld examples are located here
<https://github.com/aerogear/aerogear-push-helloworld/releases/latest>.
Some more advanced examples, including a Picketlink secured JAX-RS
application, as well as a Fabric8 based Proxy, are available here
<https://github.com/aerogear/aerogear-push-quickstarts/releases/latest>.
For those of you who that are into Swift, there Swift branches for these
demos as well:
-
https://github.com/aerogear/aerogear-push-helloworld/tree/swift/ios-swift
- https://github.com/cvasilak/aerogear-push-quickstarts/tree/swift
<https://gist.github.com/matzew/a87119d5c480cb357b24#feedback>Feedback
We hope you enjoy the bits and we do appreciate your feedback! Swing by on
our mailing list <https://lists.jboss.org/mailman/listinfo/aerogear-dev>!
We are looking forward to hear from you!
NOTE: the Openshift online offering will be updated w/in the next day or two
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
10 years, 4 months