跳到主要内容

评分和评论 SDK for Unreal (版本 10.0.0)

一般

RuStore In-app 评论 SDK 鼓励用户评估您的应用程序并在 RuStore 上留下反馈,而无需离开应用程序。

评分和用户反馈场景可以随时在您的应用程序中的用户路径中运行。 用户可以从 1 到 5 评分您的应用程序,并留下反馈。

实施例子

查看 例例应用程序报告了解如何正确整合评论和评级SDK。

用户场景例子

img

什么时候要求在应用中评分和审查

使用下面的提示来决定什么时候要求用户评分并留下反馈: (参见下方)

  • 开始这个过程,一旦用户已经使用了您的应用程序很长一段时间。

  • 避免经常开始,因为这会损害您的应用程序的用户体验,并限制使用或SDK评分。

  • 避免使用“Rate App”按钮等行动呼叫,因为用户可能已经达到过程开始限制。

  • 您的应用程序不应该在启动之前或在运行过程中向用户提出任何问题,包括他们的意见(“您喜欢该应用程序吗?”)或预测问题(“您可以给该应用程序5星?”)。

设计建议

使用下面的提示来决定如何整合过程:

  • 显示过程如同,无干预或修改现有设计,包括尺寸,不透明度,形状和其他属性。

  • 不要在上方或进程的侧面添加任何东西。

  • 该过程应在所有层的顶部开放. 开始后不要关闭过程. 该过程在用户的明确行动后会自行关闭。

连接到项目

  1. Plugins 文件夹的内容从 RuStore 官方在 GitFlic 上的仓库复制到您项目中的 Plugins 文件夹内。
  2. 重启 Unreal Engine。
  3. 在插件列表中(Edit > Plugins > Project > Mobile),勾选插件 RuStoreReviewRuStoreCore
  4. YourProject.Build.cs 文件的 PublicDependencyModuleNames 列表中添加 RuStoreCoreRuStoreReview 模块。
  5. 在项目设置中(Edit > Project Settings > Android),将 Minimum SDK Version 设置为不低于 24Target SDK Version 设置为不低于 31

与用户评级合作

以用户评分开始

要与评论合作,您需要启动RuStoreReviewManager 业务。

URuStoreReviewManager::Instance()->Init();

蓝印的例子:

img
信息

Init()呼叫将对象连接到场景根,如果对象没有进一步工作,则必须呼叫Dispose()方法释放记忆。 呼叫 Dispose方法将从根中解锁对象并安全完成所有发送的请求。

URuStoreReviewManager::Instance()->Dispose();

如果您需要检查图书馆是启动的,请使用 getIsInitialized() 报告方法,如果图书馆是启动的,则返回 true 报告,如果图书馆是启动的,则返回 false 报告,如果 Init 报告还没有被召回。

准备申请应用评级

Call RequestReviewFlow() in advance before calling LaunchReviewFlow(), to prepare necessary information to display. ReviewInfo has a lifetime — about five minutes.
RequestReviewFlow
long requestId = URuStoreReviewManager::Instance()->RequestReviewFlow(
[](long requestId) {
// Process response
},
[](long requestId, TSharedPtr<FURuStoreError, ESPMode::ThreadSafe> error) {
// Process error
}
);

蓝印的例子:

Failure通话回复 FURuStoreError结构与错误信息在Error参数。

在应用中引导评级流

To run the feedback form in your app, call the LaunchReviewFlow() method using the previously obtained ReviewInfo.

每个请求返回请求,这是一个独特的应用程序启动。 每个事件返回 requestId 报告的请求,引发了这个事件。

LaunchReviewFlow
long requestId = URuStoreReviewManager::Instance()->LaunchReviewFlow(
[](long requestId) {
// Process response
},
[](long requestId, TSharedPtr<FURuStoreError, ESPMode::ThreadSafe> error) {
// Process error
}
);

Blueprint 實施:

Await notification that the user has completed the form in onSuccess or onFailure to proceed with the application. After completing the feedback form, regardless of the outcome (onSuccess or onFailure), it is not recommended to display any additional forms related to assessment and feedback. If called frequently, LaunchReviewFlow will not display the feedback window to the user, as the allowed display is regulated by RuStore.

处理错误

The errors that occur can be retrieved in the events Failure.

错误结构

USTRUCT(BlueprintType)
struct RUSTORECORE_API FURuStoreError
{
GENERATED_USTRUCT_BODY()

FURuStoreError()
{
name = "";
description = "";
}

UPROPERTY(BlueprintReadOnly)
FString name;

UPROPERTY(BlueprintReadOnly)
FString description;
};
  • name - 错误名称;
  • description - 错误描述。

错误列表

  • RuStoreNotInstalledException — RuStore is not installed on the user's device;
  • RuStoreOutdatedException — RuStore version installed on the user's device does not support this SDK;
  • RuStoreUserUnauthorizedException — user is not authorized in RuStore;
  • RuStoreRequestLimitReached — not enough time has passed since the process was last shown;
  • RuStoreReviewExists — this user has already rated your app;
  • RuStoreInvalidReviewInfo — problems with ReviewInfo;
  • RuStoreException — basic RuStore error from which other errors are inherited