评分和评论 SDK for Godot (版本 2.0.0)
一般
RuStore In-app 评论 SDK 鼓励用户评估您的应用程序并在 RuStore 上留下反馈,而无需离开应用程序。
评分和用户反馈场景可以随时在您的应用程序中的用户路径中运行。 用户可以从 1 到 5 评 分您的应用程序,并留下反馈。
实施例子
查看 应用示例,了解如何正确整合反馈SDK。
用户场景例子
原則
为了评级和反馈 SDK 能够正常运作,必须满足以下条件:
- Android 8.0 or later
- The current version of RuStore is installed on the user's device
- User is authorized in RuStore
-
App mus be published in RuStore
什么时候请求反馈
使用下面的提示来决定什么时候要求用户评分并留下反馈: (参见下方)
-
开始这个过程,一旦用户已经使用了您的应用程序很长一段时间。
-
避免经常开始,因为这会损害您的应用程序的用户体验,并限制使用或SDK评分。
-
避免使用“Rate App”按钮等行动呼叫,因为用户可能已经达到过程开始限制。
-
您的应用程序不应该在启动之前或在运行过程中向用户提出任何问题,包括他们的意见(“您喜欢该应用程序吗?”)或预测问题(“您可以给该应用程序5星?”)。
设计建议
使用下面的提示来决定如何整合过程:
-
显示过程如同,无干预或修改现有设计,包括尺寸,不透明度,形状和其他属性。
-
不要在上方或进程的侧面添加任何东西。
-
该过程应在所有层的顶部开放. 开始后不要关闭过程. 该过程在用户的明确行动后会自行关闭。
连接到项目
- 从官方 RuStore 存储库复制插件项目到 GitFlic目录。
- 从您的 IDE 中的
godot_plugin_libraries文件夹中打开 Android 项目。 - 将
godot-lib.xxx.yyy.template_release.aar包移动到godot_plugin_libraries / libs,在那里 xxx.yyy 是您的 Godot 引擎的版本。 - 通过
gradle assemble命令构建项目。
如果构建成功,将创建在 godot_example / android / plugins 中的文件:
- 首頁 〉外文書 〉文學 〉文學 〉Gdap
- 主持人:AAR
- 主持人:Gdap
- 主持人:AAR
请注意,插件图书馆必须为您的Godot发动机版本构建。
-
将
godot_example/android/plugins报告的内容复制到your_project/android/plugins报告。 -
查看
Ru Store Godot Review和Ru Store Godot Core插件在Plugins列表中的 Android 构建预设置。
与用户评级合作
以用户评分开始
要使用评估,您需要创建一个例子 RuStoreGodotReviewManager 企业。
初步
var _review_client: RuStoreGodotReviewManager = null
func _ready:
_review_client = RuStoreGodotReviewManager.get_instance()
准备申请应用评级
Callrequest_review_flow in advance before calling launch_review_flow, to prepare necessary information to display. ReviewInfo has a lifetime — about five minutes.
You must subscribe to events once before using this method:
on_request_review_flow_success;on_request_review_flow_failure.
func _ready():
# Initialization of _review_client
_review_client.on_request_review_flow_success.connect(_on_request_review_flow_success)
_review_clientt.on_request_review_flow_failure.connect(_on_request_review_flow_failure)
func _on_request_review_flow_success():
pass
func _on_request_review_flow_failure(error: RuStoreError):
pass
_review_client.request_review_flow()
on_request_review_flow_failure通话回报 RuStoreError与错误信息. RuStoreError的错误结构在Error Handling中描述。
引发In-App评级流
To run the feedback form in your app, call thelaunch_review_flow method using the previously obtained ReviewInfo.
You must subscribe to events once before using this method:
on_request_review_flow_success;on_request_review_flow_failure.
func _ready():
# Initialization of _review_client
_review_client.on_launch_review_flow_success.connect(_on_launch_review_flow_success)
_review_client.on_launch_review_flow_failure.connect(_on_launch_review_flow_failure)
func _on_launch_review_flow_success():
pass
func _on_launch_review_flow_failure(error: RuStoreError):
pass
_review_client.launch_review_flow()
on_launch_review_flow_success or on_launch_review_flow_failure to proceed with the application.
on_launch_review_flow_failure通话回报 RuStoreError与错误信息. RuStoreError的错误结构在Error Handling中描述。
Success or Failure), it is not recommended to display any additional forms related to assessment and feedback.
If called frequently, launch_review_flow will not display the feedback window to the user, as the allowed display is regulated by RuStore.
处理错误
发生的错误可以在事件*_failure 中获取。
错误结构
class_name RuStoreError extends Object
var description: String
func _init(json: String = ""):
if json == "":
description = ""
else:
var obj = JSON.parse_string(json)
description = obj["detailMessage"]
description– error 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 withReviewInfo;RuStoreException— basic RuStore error from which other errors are inherited。