How to send input field text to google market review?

Hello everyone, and I have a problem. I want the user to write a review inside the game and then submit it to the game page in the play market. I found a way to send text to any site. But also found how to open play market review. There are:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;
using Google.Play.Review;

public class FeedbackField : MonoBehaviour
{
    public Button sendButton;
    public InputField inputUser;
    private ReviewManager _reviewManager;
    public string URL = "my game page";
    void Start()
    {
        sendButton.onClick.AddListener(ShowTheReview);     
    }

    //Way 1
    public void Send()
    {
        StartCoroutine(Post(inputUser.text));
    }

    IEnumerator Post(string text)
    {
        WWWForm form = new WWWForm();
        form.AddField("", text);
        UnityWebRequest www = UnityWebRequest.Post(URL, form);
        yield return form;
    }
    //End

    //Way 2
    public void ShowTheReview()
    {
        StartCoroutine(StartTheReview());
    }

    public IEnumerator StartTheReview()
    {

        _reviewManager = new ReviewManager();
        var requestFlowOperation = _reviewManager.RequestReviewFlow();
        yield return requestFlowOperation;
        if (requestFlowOperation.Error != ReviewErrorCode.NoError)
        {
            yield break;
        }

        var _playReviewInfo = requestFlowOperation.GetResult();
        var launchFlowOperation = _reviewManager.LaunchReviewFlow(_playReviewInfo);
        yield return launchFlowOperation;
        _playReviewInfo = null;
        if (launchFlowOperation.Error != ReviewErrorCode.NoError)
        {
            yield break;
        }
    }
    //End

}

So, I want to combine these two ways. The user writes text in the input field, then when the button is clicked, a page in the play market opens with a review already filled out.

I don’t think this is supported since the pop-up is outside of the Unity scope

When you say play market, you mean the Google play store?

If you’re doing this through a mobile app, there is a specific flow required to request a user rate (and thus write a review) of your app that both Google and Apple have in place. I don’t think that allows you to pass data into the review field from your app.

Even if there was a way, I wouldn’t ever personally use it. Perhaps you’re trying to solve a problem that doesn’t really exist?

1 Like