Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

It is using in gcm data.additionalData ? #126

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

It is using in gcm data.additionalData ? #126

eros2187 opened this issue Sep 11, 2015 · 10 comments
Labels

Comments

@eros2187
Copy link

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
Copy link
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.

@eros2187
Copy link
Author

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
Copy link
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.

@eros2187
Copy link
Author

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 reopened this Sep 11, 2015
@macdonst
Copy link
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

@eros2187
Copy link
Author

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
Copy link
Member

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

@macdonst
Copy link
Member

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

@eros2187
Copy link
Author

#130

@lock
Copy link

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.
Labels
Development

No branches or pull requests

2 participants