[aerogear-dev] Unified Push, user-data field and Android push

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[aerogear-dev] Unified Push, user-data field and Android push

Summers Pittman
So I had a post on my Google+ (I know that was my reaction too) page from a user who was having trouble with UPS, user-data, and Android.  I'm not sure WHERE his problem is, but I will describe it here and we can discuss further.

Let's say we send the following to UPS using the sender API : 

{
     "message": {
"alert" : "Remote service failed. View FAQs.",
"sound": "default",
"badge": -1,
"user-data": {
"SXM": {
"CATEGORY" : "SERVICE",
"SERVICETYPE": "Remote",
"SRID": "BB4FC7F0-15E9-11E6-9F41-0050569C3256",
"APPCONTENT": "UNKNOWN",
"STATUS": "FAIL",
"STATUSCHANGE_DATETIME": "UNKNOWN",
"URL": "XYZABC.com"
}
}
     }
   }

Android will receive the following message bundle from Google : 

Bundle[
  {aerogear-push-id=3f2b9477-fc9e-463a-94d7-d62bf55706e1, 
   SXM={CATEGORY=SERVICE, SERVICETYPE=Remote, SRID=BB4FC7F0-15E9-11E6-9F41-0050569C3256, APPCONTENT=UNKNOWN, STATUS=FAIL, STATUSCHANGE_DATETIME=UNKNOWN, URL=XYZABC.com}, 
   alert=Remote service failed. View FAQs., 
   badge=-1, 
   sound=default,  
   collapse_key=do_not_collapse}
]

As we can see, several things have happened.  1) user-data has been rolled up into a root element, and the SXM root object's JSON body has been stripped of its jsonness.  IDEALLY we would be able to keep the body of userdata as a string for user's to handle themselves.  

I THINK this is an issue with how UPS converts the message for sending to GCM, but i haven't researched that far.

Summers

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Unified Push, user-data field and Android push

Matthias Wessendorf

On Fri, May 13, 2016 at 6:57 PM, Summers Pittman <[hidden email]> wrote:
So I had a post on my Google+ (I know that was my reaction too) page from a user who was having trouble with UPS, user-data, and Android.  I'm not sure WHERE his problem is, but I will describe it here and we can discuss further.

Let's say we send the following to UPS using the sender API : 

{
     "message": {
"alert" : "Remote service failed. View FAQs.",
"sound": "default",
"badge": -1,
"user-data": {
"SXM": {
"CATEGORY" : "SERVICE",
"SERVICETYPE": "Remote",
"SRID": "BB4FC7F0-15E9-11E6-9F41-0050569C3256",
"APPCONTENT": "UNKNOWN",
"STATUS": "FAIL",
"STATUSCHANGE_DATETIME": "UNKNOWN",
"URL": "XYZABC.com"
}
}
     }
   }

Android will receive the following message bundle from Google : 

Bundle[
  {aerogear-push-id=3f2b9477-fc9e-463a-94d7-d62bf55706e1, 
   SXM={CATEGORY=SERVICE, SERVICETYPE=Remote, SRID=BB4FC7F0-15E9-11E6-9F41-0050569C3256, APPCONTENT=UNKNOWN, STATUS=FAIL, STATUSCHANGE_DATETIME=UNKNOWN, URL=XYZABC.com}, 
   alert=Remote service failed. View FAQs., 
   badge=-1, 
   sound=default,  
   collapse_key=do_not_collapse}
]

As we can see, several things have happened.  1) user-data has been rolled up into a root element, and the SXM root object's JSON body has been stripped of its jsonness.  IDEALLY we would be able to keep the body of userdata as a string for user's to handle themselves.  

I THINK this is an issue with how UPS converts the message for sending to GCM, but i haven't researched that far.

Summers

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Unified Push, user-data field and Android push

Erik Jan de Wit
Yeah, though he was doing something like that, basically we only support key values in user-data not complex objects.

On Sat, May 14, 2016 at 5:03 AM, Matthias Wessendorf <[hidden email]> wrote:

On Fri, May 13, 2016 at 6:57 PM, Summers Pittman <[hidden email]> wrote:
So I had a post on my Google+ (I know that was my reaction too) page from a user who was having trouble with UPS, user-data, and Android.  I'm not sure WHERE his problem is, but I will describe it here and we can discuss further.

Let's say we send the following to UPS using the sender API : 

{
     "message": {
"alert" : "Remote service failed. View FAQs.",
"sound": "default",
"badge": -1,
"user-data": {
"SXM": {
"CATEGORY" : "SERVICE",
"SERVICETYPE": "Remote",
"SRID": "BB4FC7F0-15E9-11E6-9F41-0050569C3256",
"APPCONTENT": "UNKNOWN",
"STATUS": "FAIL",
"STATUSCHANGE_DATETIME": "UNKNOWN",
"URL": "XYZABC.com"
}
}
     }
   }

Android will receive the following message bundle from Google : 

Bundle[
  {aerogear-push-id=3f2b9477-fc9e-463a-94d7-d62bf55706e1, 
   SXM={CATEGORY=SERVICE, SERVICETYPE=Remote, SRID=BB4FC7F0-15E9-11E6-9F41-0050569C3256, APPCONTENT=UNKNOWN, STATUS=FAIL, STATUSCHANGE_DATETIME=UNKNOWN, URL=XYZABC.com}, 
   alert=Remote service failed. View FAQs., 
   badge=-1, 
   sound=default,  
   collapse_key=do_not_collapse}
]

As we can see, several things have happened.  1) user-data has been rolled up into a root element, and the SXM root object's JSON body has been stripped of its jsonness.  IDEALLY we would be able to keep the body of userdata as a string for user's to handle themselves.  

I THINK this is an issue with how UPS converts the message for sending to GCM, but i haven't researched that far.

Summers

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Cheers,
       Erik Jan

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev
Reply | Threaded
Open this post in threaded view
|

Re: [aerogear-dev] Unified Push, user-data field and Android push

Summers Pittman


On Sat, May 14, 2016 at 4:22 AM, Erik Jan de Wit <[hidden email]> wrote:
Yeah, though he was doing something like that, basically we only support key values in user-data not complex objects.

Perhaps we should just stringify complex objects? 


On Sat, May 14, 2016 at 5:03 AM, Matthias Wessendorf <[hidden email]> wrote:

On Fri, May 13, 2016 at 6:57 PM, Summers Pittman <[hidden email]> wrote:
So I had a post on my Google+ (I know that was my reaction too) page from a user who was having trouble with UPS, user-data, and Android.  I'm not sure WHERE his problem is, but I will describe it here and we can discuss further.

Let's say we send the following to UPS using the sender API : 

{
     "message": {
"alert" : "Remote service failed. View FAQs.",
"sound": "default",
"badge": -1,
"user-data": {
"SXM": {
"CATEGORY" : "SERVICE",
"SERVICETYPE": "Remote",
"SRID": "BB4FC7F0-15E9-11E6-9F41-0050569C3256",
"APPCONTENT": "UNKNOWN",
"STATUS": "FAIL",
"STATUSCHANGE_DATETIME": "UNKNOWN",
"URL": "XYZABC.com"
}
}
     }
   }

Android will receive the following message bundle from Google : 

Bundle[
  {aerogear-push-id=3f2b9477-fc9e-463a-94d7-d62bf55706e1, 
   SXM={CATEGORY=SERVICE, SERVICETYPE=Remote, SRID=BB4FC7F0-15E9-11E6-9F41-0050569C3256, APPCONTENT=UNKNOWN, STATUS=FAIL, STATUSCHANGE_DATETIME=UNKNOWN, URL=XYZABC.com}, 
   alert=Remote service failed. View FAQs., 
   badge=-1, 
   sound=default,  
   collapse_key=do_not_collapse}
]

As we can see, several things have happened.  1) user-data has been rolled up into a root element, and the SXM root object's JSON body has been stripped of its jsonness.  IDEALLY we would be able to keep the body of userdata as a string for user's to handle themselves.  

I THINK this is an issue with how UPS converts the message for sending to GCM, but i haven't researched that far.

Summers

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev



--
Cheers,
       Erik Jan

_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev


_______________________________________________
aerogear-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-dev