我有一个 webview 应用程序。我在 Laravel 中编写了该项目。我想使用推送通知。但是我怎样才能获得设备令牌呢?我在哪里可以找到它?
$push->setMessage([
'notification' => [
'title'=>'This is the title',
'body'=>'This is the message',
'sound' => 'default'
],
'data' => [
'extraPayLoad1' => 'value1',
'extraPayLoad2' => 'value2'
]
]);
$push->setApiKey('Server-API-Key');
$push->setDevicesToken(['deviceToken1'
,'deviceToken2',
'deviceToken3'
]);
什么是 deviceToken1 2 3?
我在 Firebase 中创建了一个项目。我可以得到API。但是我怎样才能找到并保存设备的令牌呢?我无法向屏幕发送通知。