我正在尝试在 Django 中实现通知系统。我发现firebase很容易,如下所示:
from fcm_django.models import FCMDevice
device = FCMDevice.objects.all()
现在来看:
device.send_message(title="Title", body="Message", icon=..., data={"test": "test"})
在设置中:
FCM_DJANGO_SETTINGS = {
# default: _('FCM Django')
"APP_VERBOSE_NAME": "[string for AppConfig's verbose_name]",
# true if you want to have only one active device per registered user at a time
# default: False
"ONE_DEVICE_PER_USER": True/False,
# devices to which notifications cannot be sent,
# are deleted upon receiving error response from FCM
# default: False
"DELETE_INACTIVE_DEVICES": True/False,
# Transform create of an existing Device (based on registration id) into
# an update. See the section
# "Update of device with duplicate registration ID" for more details.
"UPDATE_ON_DUPLICATE_REG_ID": True/False,
}
现在我的问题是,我们将 AWS 用于后端和数据库。在这种情况下,我们可以使用 firebase 进行通知吗?这两个服务 aws 和 firebase 如何协同工作?会不会有问题??