Hey forum,
I am sending a push notification from a PHP-script to my Android device and the device receives the notification. So far so good. Also when you start the application from the push notification everything at the corona side gets works as it should.
The problem is how the push notification is displayed. All I see in the notification center on my device is the corona_statusbar_icon_default icon and the name of the Application.
No message is shown, no title, no subtitle, nothing. Only those two items.
Do I have to enable something in Corona to have that displayed there or at the PHP-side of the notification?
I have tried this with the example app and encountered the same issue.
This is my php code:
$msg = array ( 'message' =\> 'here is a message. message', 'title' =\> 'This is a title. title', 'subtitle' =\> 'This is a subtitle. subtitle', 'tickerText' =\> 'Ticker text here...Ticker text here...Ticker text here' ); $url = 'https://android.googleapis.com/gcm/send'; $fields = array( 'registration\_ids' =\> $androidUsers, 'data' =\> $msg ); $headers = array( 'Authorization: key=' . $apiKey, 'Content-Type: application/json' ); // Open connection $ch = curl\_init(); // Set the url, number of POST vars, POST data curl\_setopt( $ch, CURLOPT\_URL, $url ); curl\_setopt( $ch, CURLOPT\_POST, true ); curl\_setopt( $ch, CURLOPT\_HTTPHEADER, $headers); curl\_setopt( $ch, CURLOPT\_RETURNTRANSFER, true ); curl\_setopt( $ch, CURLOPT\_POSTFIELDS, json\_encode( $fields ) ); // Execute post $result = curl\_exec($ch); // Close connection curl\_close($ch);
The Corona code is the sample project: GooglePushNotifications
The build is CoronaEnterprise.2014.2123
Any solutions?