[aerogear-dev] cordova push plugin simplification

keithdmoore94 keith at kdmooreconsulting.com
Thu Mar 13 06:39:24 EDT 2014


Good point.  I hate having to do device checks. 

> On Mar 13, 2014, at 2:46 AM, "Erik Jan de Wit [via aerogear-dev]" <ml-node+s1069024n6769h66 at n5.nabble.com> wrote:
> 
> Hi,
> 
> Currently the plugin supports only one set of varaintId and secret and if you want to create an application for android and iOS you would have logic like
> if (device.platform == ‘android’) {
>    variantId = "<variantID for android>";
> } else {
>    variantId = "<variantID for iOS>";
> }
> so with this grouping you don’t have to have this if else logic anymore as you can just add them in the config like so:
> var pushConfig = {
> 
>     pushServerURL: "<pushServerURL e.g http(s)//host:port/context >",
> 
>     alias: "<alias e.g. a username or an email address optional>",
>     android: {
> 
>       senderID: "<senderID e.g Google Project ID only for android>",
>       variantID: "<variantID e.g. 1234456-234320>",
> 
>       variantSecret: "<variantSecret e.g. 1234456-234320>"
>     },
>     ios: {
> 
>       variantID: "<variantID e.g. 1234456-234320>",
>       variantSecret: "<variantSecret e.g. 1234456-234320>"
> 
>     }
> };
> And when a windows phone is added you’ll still have to change the code to add the variantId for windows. As we don’t have a way to register for the application only for the variant this is the compromise.
> 
> Cheers,
> 	Erik Jan
> 
> 
> _______________________________________________ 
> aerogear-dev mailing list 
> [hidden email] 
> 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/aerogear-dev-cordova-push-plugin-simplification-tp6523p6769.html
> To unsubscribe from [aerogear-dev] cordova push plugin simplification, click here.
> NAML




--
View this message in context: http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-cordova-push-plugin-simplification-tp6523p6772.html
Sent from the aerogear-dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140313/3a56af2b/attachment.html 


More information about the aerogear-dev mailing list