Multiple categories?

classic Classic list List threaded Threaded
5 messages Options
mo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Multiple categories?

mo
Hi,

This sample code specifies only one category, "mail".  Is it possible to specify multiple categories?  For example, categories `["A", "B", "C"]`.  If so, when I receive a message, will I be able to tell to which category the message belongs?  If the sender were to tag the message as category "A", would the client be able to inspect the message and extract "A"?

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Multiple categories?

Erik Jan de Wit

On Mon, Jul 6, 2015 at 4:59 PM, mo <[hidden email]> wrote:
specifies only one category, "mail".  Is it possible to specify multiple
categories?  For example, categories `["A", "B", "C"]`.  If so, when I

 Yes that is possible

receive a message, will I be able to tell to which category the message
belongs?  If the sender were to tag the message as category "A", would the
client be able to inspect the message and extract "A"?

Not out of the box, but you could add the category manually when sending and then the client can read it.

See here: https://aerogear.org/docs/unifiedpush/push-message-format/ or here https://aerogear.org/docs/unifiedpush/push-message-format-dev/ depending on your version you can add user defined keys to the message (someKey, anotherCustomKey)

If you put your category there as well the client will get it when it receives the message. 

--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Multiple categories?

Matthias Wessendorf


On Monday, July 6, 2015, Erik Jan de Wit <[hidden email]> wrote:

On Mon, Jul 6, 2015 at 4:59 PM, mo <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;michi.oshima@gmail.com&#39;);" target="_blank">michi.oshima@...> wrote:
specifies only one category, "mail".  Is it possible to specify multiple
categories?  For example, categories `["A", "B", "C"]`.  If so, when I

 Yes that is possible

receive a message, will I be able to tell to which category the message
belongs?  If the sender were to tag the message as category "A", would the
client be able to inspect the message and extract "A"?

Not out of the box, but you could add the category manually when sending and then the client can read it.

See here: https://aerogear.org/docs/unifiedpush/push-message-format/ or here https://aerogear.org/docs/unifiedpush/push-message-format-dev/ depending on your version you can add user defined keys to the message (someKey, anotherCustomKey)

That is a good idea, Erik! I like it :-)

I think the problem here is the usage of SimplePush: the push server only send a version/timestamp :-/

-M

 

If you put your category there as well the client will get it when it receives the message. 

--
Cheers,
       Erik Jan


--
Sent from Gmail Mobile

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Multiple categories?

Erik Jan de Wit
Oops, didn't see it was about simple push, in that case it's still possible tough, only have to query your backend with the 'number' you supplied your client with. To elaborate let's say with category 'a' I send a message with number 26, then when the client queries the backend, after receiving the notification, with number 26, the backend can inform the client that it was category 'a' that was used to "triggered" it.

Does that make sense?

On Mon, Jul 6, 2015 at 11:10 PM, Matthias Wessendorf <[hidden email]> wrote:


On Monday, July 6, 2015, Erik Jan de Wit <[hidden email]> wrote:

On Mon, Jul 6, 2015 at 4:59 PM, mo <[hidden email]> wrote:
specifies only one category, "mail".  Is it possible to specify multiple
categories?  For example, categories `["A", "B", "C"]`.  If so, when I

 Yes that is possible

receive a message, will I be able to tell to which category the message
belongs?  If the sender were to tag the message as category "A", would the
client be able to inspect the message and extract "A"?

Not out of the box, but you could add the category manually when sending and then the client can read it.

See here: https://aerogear.org/docs/unifiedpush/push-message-format/ or here https://aerogear.org/docs/unifiedpush/push-message-format-dev/ depending on your version you can add user defined keys to the message (someKey, anotherCustomKey)

That is a good idea, Erik! I like it :-)

I think the problem here is the usage of SimplePush: the push server only send a version/timestamp :-/

-M


 

If you put your category there as well the client will get it when it receives the message. 

--
Cheers,
       Erik Jan


--
Sent from Gmail Mobile

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




--
Cheers,
       Erik Jan

_______________________________________________
Aerogear-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/aerogear-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Aerogear-users] Multiple categories?

Matthias Wessendorf


On Tue, Jul 7, 2015 at 1:04 AM, Erik Jan de Wit <[hidden email]> wrote:
Oops, didn't see it was about simple push, in that case it's still possible tough, only have to query your backend with the 'number' you supplied your client with. To elaborate let's say with category 'a' I send a message with number 26, then when the client queries the backend, after receiving the notification, with number 26, the backend can inform the client that it was category 'a' that was used to "triggered" it.

Does that make sense?

yes, totally

Just shows the trade offs of SimplePush :-) 
 

On Mon, Jul 6, 2015 at 11:10 PM, Matthias Wessendorf <[hidden email]> wrote:


On Monday, July 6, 2015, Erik Jan de Wit <[hidden email]> wrote:

On Mon, Jul 6, 2015 at 4:59 PM, mo <[hidden email]> wrote:
specifies only one category, "mail".  Is it possible to specify multiple
categories?  For example, categories `["A", "B", "C"]`.  If so, when I

 Yes that is possible

receive a message, will I be able to tell to which category the message
belongs?  If the sender were to tag the message as category "A", would the
client be able to inspect the message and extract "A"?

Not out of the box, but you could add the category manually when sending and then the client can read it.

See here: https://aerogear.org/docs/unifiedpush/push-message-format/ or here https://aerogear.org/docs/unifiedpush/push-message-format-dev/ depending on your version you can add user defined keys to the message (someKey, anotherCustomKey)

That is a good idea, Erik! I like it :-)

I think the problem here is the usage of SimplePush: the push server only send a version/timestamp :-/

-M


 

If you put your category there as well the client will get it when it receives the message. 

--
Cheers,
       Erik Jan


--
Sent from Gmail Mobile

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




--
Cheers,
       Erik Jan

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




--

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