Hi
I am using the GCM library here, and it is working fine while using the desktop cmd
once I am trying to implemete php that will send the GCM messgae, (using many site examples)
such as:
http://www.androidhive.info/2012/10...ing-google-cloud-messaging-gcm-php-and-mysql/
or:
https://github.com/mattg888/GCM-PHP-Server-Push-Message/blob/master/GCMPushMessage.php
the message arrive (I am getting the new message arrived + icon) but it is withot any message (text)
I am only getting the icon, from, and collapseKey, no msg or data
I think the issue is with the library implementation, since it cannot be that all examples are not working
any idea?
I am using the GCM library here, and it is working fine while using the desktop cmd
once I am trying to implemete php that will send the GCM messgae, (using many site examples)
such as:
http://www.androidhive.info/2012/10...ing-google-cloud-messaging-gcm-php-and-mysql/
or:
https://github.com/mattg888/GCM-PHP-Server-Push-Message/blob/master/GCMPushMessage.php
the message arrive (I am getting the new message arrived + icon) but it is withot any message (text)
B4X:
Sub MessageArrived (Intent As Intent)
Dim From, CollapseKey, Data, Msg As String 'ignore
If Intent.HasExtra("from") Then From = Intent.GetExtra("from")
If Intent.HasExtra("data") Then Data = Intent.GetExtra("data")
If Intent.HasExtra("msg") Then Msg = Intent.GetExtra("msg")
If Intent.HasExtra("collapse_key") Then CollapseKey = Intent.GetExtra("collapse_key")
Dim n As Notification
n.Initialize
n.Light = False
n.Vibrate = False
n.Icon = "icon"
n.SetInfo("Enail", Data, "Main") 'Change Main to "" if this code is in the main module.
n.notify(Num_notify)
Num_notify=Num_notify+1
Log ("Data=" & Data)
Log ("From=" & From)
Log ("CollapseKey=" & CollapseKey)
Log ("Msg=" & Msg)
'Here you should handle the new message:
Log("New message arrived: " & Data)
ToastMessageShow("New message: " & Data, True)
End Sub
I am only getting the icon, from, and collapseKey, no msg or data
I think the issue is with the library implementation, since it cannot be that all examples are not working
any idea?
Last edited: