wiebenieuwenhuis/

expo-notification

使用Expo发送推送通知

1.3.4 2020-11-07 18:55 UTC

This package is auto-updated.

Last update: 2024-09-08 03:16:20 UTC


README

使用Expo API发送通知

示例

$notification = new ExpoNotification();

$result = $notification
	->to([
		'ExponentPushToken[GoVJ_qPG41_nHi-4EQS5UU]',
		'ExponentPushToken[P7yjE4MojbyaqpOiwwANgB]'
	])
	->title('test')
	->body('message')
	->data([
		'row' => 'item'
	])
	->badge(1)
	->channel('default')
	->sound('default')
	//->silent()
	//->test()
	->send();

print_r($result);