Skip to content

FCM not working #195

@mubassirhayat

Description

@mubassirhayat

Below is my code for FCM
I tested it on an app a while and it worked like a charm but now for some reason, it's not working, can anyone of you help?

$androidDevices[] = PushNotification::Device($user->device_token);
$androidDevicesNotify = PushNotification::DeviceCollection($androidDevices);
$data = [
    'title' => "AppName",
    'body'  => 'You have a new request from User',
    'custom'  => [
        'request_id' => 1
    ]
];
$message = PushNotification::Message('You have a new request from User', $data);
$androidCollection = PushNotification::app('AppAndroid');
$androidCollection->adapter->setAdapterParameters(['sslverifypeer' => false]);
$androidCollection->to($androidDevicesNotify)->send($message);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions