0

My backend is on Laravel and App is on Flutter

I have found this FCM WITH AWS

However my question is how to send GCM data showed by @Nathan using AWS Sdk/Api

{
"GCM": "{ \"notification\": { \"title\": \"test title\", \"body\": \"test body\" } }"
}

My message is delivering to my app however I can't set few variables such as

contentAvailable

Also not sure how to send sound type.

Thanks for the help

Zee
  • 351
  • 1
  • 15

1 Answers1

0

I have managed to make it work even it's partially for now.

This works for me

$GCM = json_encode(json_encode([
        "notification" => [
            "content_available" =>  true,
            "body"  =>  "Don't forget to put your fogo bin outside",
            "title" =>  "Hello"
        ],
    ]), JSON_UNESCAPED_SLASHES);


$message = '{ "default": "test", "GCM":' . $GCM . ' }';

I have not managed to set contentAvailable and not sure how to send sound in there but getting there so if anyone can help me with remaining tasks will be highly appreciated :)

Zee
  • 351
  • 1
  • 15