将数据保存在 Google 助手外的 userStorage 中

Save data in userStorage outside the Google Assistant

我有一个应用程序(使用 Xamarin 开发),当用户第一次登录时,它会生成一些关于用户的信息。

我需要将此信息保存在 Google Assistant 的 userStorage 中,以便我可以在内联编辑器中获取此信息以实现 Dialogflow。

我已经有了从 userStorage 获取信息的代码:

let userStorage = request.body.originalDetectIntentRequest.payload.user.userStorage || JSON.stringify({});
let uninterId;

userStorage = JSON.parse(userStorage);

if (userStorage.hasOwnProperty('uninterId')) {
    uninterId = userStorage.uninterId;
}

现在我需要知道如何让我的应用程序通过我的 Android 应用程序保存该信息。

是否可以将数据保存在 Google 助手之外的 userStorage 中?

我该怎么做?

用户存储只能在您的操作范围内使用。如果您有兴趣在您的操作上下文之外使用此数据,您可能需要考虑第三方数据库服务,例如 Firebase.