I'm trying to implement in-app subscriptions in my app. So ,first I set upped the real time notifications. But the problem is that I can't test them for in-app subscriptions. Can anyone help me with this? Let me describe what I have.
When I hit the SEND TEST NOTIFICATION button, I can successfully receive the request, but the problem is that the request has no any values, as described here.
https://developer.android.com/google/play/billing/realtime_developer_notifications
According to link,
Each publish made to a Pub/Sub topic contains a single base64-encoded DeveloperNotification with the following fields:
{
"version": string,
"packageName": string
"eventTimeMillis": long
"oneTimeProductNotification": OneTimeProductNotification
"subscriptionNotification": SubscriptionNotification
"testNotification": TestNotification
}
and
A TestNotification contains the following fields:
{
"version": string
}
So my question is , how can test this Json? I mean why the request has no values ?
Thanks.
Sorry Guys. I found the problem. I was trying to get the fields in the wrong way. As my server technology is PHP,I was trying to get from $_POST array, but the right way is
$result = file_get_contents("php://input");