New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is using in gcm data.additionalData ? #126

Closed
eros2187 opened this Issue Sep 11, 2015 · 10 comments

Comments

Projects
None yet
2 participants
@eros2187

plus data.image , etc. there is a possibility of sending tightens customized using data.additionadata but how? you can see an example of java code must send via gcm thanks

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 11, 2015

Member

@eros2187 I'm not sure I understand the question. Any key that doesn't match the basic types: message, title, count, sound, image it will end up in additionalData.

Member

macdonst commented Sep 11, 2015

@eros2187 I'm not sure I understand the question. Any key that doesn't match the basic types: message, title, count, sound, image it will end up in additionalData.

@macdonst macdonst added the question label Sep 11, 2015

@eros2187

This comment has been minimized.

Show comment
Hide comment
@eros2187

eros2187 Sep 11, 2015

have sent a strringa of this type to gcm
$ response = $ gcpm- > send ( $ message , array ( ' title ' = > $ _POST [ "title " ] , $ additionalData = > additionalData ) ) ; // Push Título do ... //
echo $ response ;
$ additionalData = array ( ' url ' = > ' www.google.com ' , ' image ' = > ' http://exsample/foto/55ee9dac2470d.jpg ' ) ;

Once I receive these data hang them using jquery in html

$ ( " #myid " ) .Append ( " < P > ' + ' < img class = " photo " src = ' + data.additional.url + ' > < / p > ' ) ;

data.additional.url from value indefinited not pass me the value ?
if you use those works data.title works!!

What's wrong ? You can help me
I can have Besides these data.image, , etc. Caunt you can send a customized string ? Example data.url ? can you explain one thing I do not understand what is additionalData or additionalData.
thanks for your help I await your response joseph greetings and thanks

have sent a strringa of this type to gcm
$ response = $ gcpm- > send ( $ message , array ( ' title ' = > $ _POST [ "title " ] , $ additionalData = > additionalData ) ) ; // Push Título do ... //
echo $ response ;
$ additionalData = array ( ' url ' = > ' www.google.com ' , ' image ' = > ' http://exsample/foto/55ee9dac2470d.jpg ' ) ;

Once I receive these data hang them using jquery in html

$ ( " #myid " ) .Append ( " < P > ' + ' < img class = " photo " src = ' + data.additional.url + ' > < / p > ' ) ;

data.additional.url from value indefinited not pass me the value ?
if you use those works data.title works!!

What's wrong ? You can help me
I can have Besides these data.image, , etc. Caunt you can send a customized string ? Example data.url ? can you explain one thing I do not understand what is additionalData or additionalData.
thanks for your help I await your response joseph greetings and thanks

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 11, 2015

Member

@eros2187 So for this code to work:

$ ( " #myid " ) .Append ( " < P > ' + ' < img class = " photo " src = ' + data.additional.url + ' > < / p > ' ) ;

you would need to use the following code to send to GCM:

$ response = $ gcpm- > send ( $ message , array ( ' title ' = > $ _POST [ "title " ] ,
  ' image ' = > ' http://exsample/foto/55ee9dac2470d.jpg ',  
  ' url ' = > ' www.google.com '  ) ) ; 

the plugin will recognize the title and image properties and call the notification event with those items as data.title and data.image. Since url is not recognized property on all platforms it gets put in as data.additionalData.url.

When you get a chance to test this and it works please comment and close the issue.

Member

macdonst commented Sep 11, 2015

@eros2187 So for this code to work:

$ ( " #myid " ) .Append ( " < P > ' + ' < img class = " photo " src = ' + data.additional.url + ' > < / p > ' ) ;

you would need to use the following code to send to GCM:

$ response = $ gcpm- > send ( $ message , array ( ' title ' = > $ _POST [ "title " ] ,
  ' image ' = > ' http://exsample/foto/55ee9dac2470d.jpg ',  
  ' url ' = > ' www.google.com '  ) ) ; 

the plugin will recognize the title and image properties and call the notification event with those items as data.title and data.image. Since url is not recognized property on all platforms it gets put in as data.additionalData.url.

When you get a chance to test this and it works please comment and close the issue.

@eros2187

This comment has been minimized.

Show comment
Hide comment
@eros2187

eros2187 Sep 11, 2015

hello I have already tried to pass data chart using all the date:
push.on ('notification', function (data) {
// Data.message,
// Data.title,
// Data.count,
// Data.sound,
// Data.image,
// data.additionalData
I wanted to know is that there are in addition to the documentation you can pass other values for example data.allegato (value created me), or there is a limit of values you can send? if you like you can do this? using data.additionalData? if you can give an example of string for gcm would be very helpful I apologize but I'm working recently and I have some doubts I take advantage of your disponibiltà
joseph greetings await a reply

hello I have already tried to pass data chart using all the date:
push.on ('notification', function (data) {
// Data.message,
// Data.title,
// Data.count,
// Data.sound,
// Data.image,
// data.additionalData
I wanted to know is that there are in addition to the documentation you can pass other values for example data.allegato (value created me), or there is a limit of values you can send? if you like you can do this? using data.additionalData? if you can give an example of string for gcm would be very helpful I apologize but I'm working recently and I have some doubts I take advantage of your disponibiltà
joseph greetings await a reply

@eros2187 eros2187 closed this Sep 11, 2015

@eros2187 eros2187 reopened this Sep 11, 2015

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 11, 2015

Member

You would send:

$ response = $ gcpm- > send ( $ message , array ( ' title ' = > $ _POST [ "title " ] ,
  ' image ' = > ' http://exsample/foto/55ee9dac2470d.jpg ',  
  ' url ' = > ' www.google.com ',
  'allegato' => 'some value'  ) ) ; 

and it would be available at data.additionalData.allegato

Member

macdonst commented Sep 11, 2015

You would send:

$ response = $ gcpm- > send ( $ message , array ( ' title ' = > $ _POST [ "title " ] ,
  ' image ' = > ' http://exsample/foto/55ee9dac2470d.jpg ',  
  ' url ' = > ' www.google.com ',
  'allegato' => 'some value'  ) ) ; 

and it would be available at data.additionalData.allegato

@eros2187

This comment has been minimized.

Show comment
Hide comment
@eros2187

eros2187 Sep 13, 2015

Thanks I tried but it does not work there will be a problem with a data.additionalData this point ?

the value of attachment
annexed ' = > ' some value '

some value means that you have any feedback ? thanks regards joseph

Thanks I tried but it does not work there will be a problem with a data.additionalData this point ?

the value of attachment
annexed ' = > ' some value '

some value means that you have any feedback ? thanks regards joseph

@macdonst macdonst added bug and removed question labels Sep 13, 2015

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 13, 2015

Member

@eros2187 I think I know what is going on. Fix to be pushed soon.

Member

macdonst commented Sep 13, 2015

@eros2187 I think I know what is going on. Fix to be pushed soon.

@macdonst

This comment has been minimized.

Show comment
Hide comment
@macdonst

macdonst Sep 13, 2015

Member

@eros2187 re-test with the upcoming 1.3.0 release and re-open if it doesn't fix your issue.

Member

macdonst commented Sep 13, 2015

@eros2187 re-test with the upcoming 1.3.0 release and re-open if it doesn't fix your issue.

@macdonst macdonst closed this Sep 13, 2015

@eros2187

This comment has been minimized.

Show comment
Hide comment
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot Jun 5, 2018

This thread has been automatically locked.

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.