Code Monkey home page Code Monkey logo

godot-googleplay-inapp-review's Introduction

Godot Google Play In-App Review Plugin

This is a Android plugin for Godot Engine 3.4 or higher.

This plugin supports:

  • Request review
  • Launch review

Setup

  • Configure, install and enable the "Android Custom Template" for your project, just follow the official documentation;
  • go to the release tab, choose a version and download the respective package;
  • extract the package and putGodotGooglePlayInAppReview.gdap and GodotGooglePlayInAppReview.x.y.z.release.aar inside the res://android/plugins directory on your Godot project.
  • on the Project -> Export... -> Android -> Options ->
    • Custom Template: check the Use Custom Build
    • Plugins: check the Godot # Godot Google Play In App Review (this plugin)

API Reference

Singletons

# Example of using
if Engine.has_singleton("GodotGooglePlayInAppReview"):
	var in_app_review = Engine.get_singleton("GodotGooglePlayInAppReview")
	in_app_review.connect("on_request_review_success", self, "_on_request_review_success")
	in_app_review.connect("on_request_review_failed", self, "_on_request_review_failed")
	in_app_review.connect("on_launch_review_flow_success", self, "_on_launch_review_flow_success")

Methods

# Request Review Info
requestReviewInfo()

# Launch review with GUI
launchReviewFlow()

Signals

# Review Info was received
on_request_review_success

# Review Info was not received or another error was received
on_request_review_failed

# Review Flow was finished
on_launch_review_flow_success

Compiling the Plugin (optional)

If you want to compile the plugin by yourself, it's very easy:

  1. clone this repository;
  2. checkout the desired version;
  3. open godot-google-play-inapp-review directory in Android Studio
  4. don't forget to put godot-lib.release.aar to godot-lib.release directory

If everything goes fine, you'll find the .aar files at godot-google-play-inapp-review/godot-inappreview/build/outputs/aar/.

Troubleshooting

  • First of all, please make sure you're able to compile the custom build for Android without plugin, this way we can isolate the cause of the issue.

  • Using logcat for Android is the best way to troubleshoot most issues. You can filter Godot only messages with logcat using the command:

adb logcat -s godot

References

Google Developers:

License

MIT license

godot-googleplay-inapp-review's People

Contributors

i-bardinov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

godot-googleplay-inapp-review's Issues

Missing file

i cant find any .aar file or .gdap file. did you include the files

Build release version

Hi, After steps in "Compiling the Plugin" in ...build/outputs/arr is only GodotGooglePlayInAppReview.1.0.1.debug.arr. How can I build the release version or they are same and I can use debug version in final version of my application?

permission.FOREGROUND_SERVICE

Hello,
Google sent an email with policy update:

"We’re adding new guidelines to our Device and Network Abuse policy:
For apps targeting Android 14 and above, a new set of policy restrictions will apply to the usage of foreground services (FGS). Apps can only declare foreground services (FGS) for appropriate use cases. Developers must also specify a valid foreground service type for each foreground service (FGS) used in your app, and declare the foreground service permission that is appropriate for that type."

As I noticed from manifest-merger-release-report, inAppReview plugin uses something named "com.google.android.play:core:1.10.2" with FOREGROUND_SERVICE permission:

uses-permission#android.permission.FOREGROUND_SERVICE
ADDED from [com.google.android.play:core:1.10.2] C:\Users\Snail\.gradle\caches\transforms-3\d07147ed84baf59d8042ffc58b2a5b2e\transformed\jetified-core-1.10.2\AndroidManifest.xml:13:5-77

I've tried to build my app w/o inAppReview plugin and there is no "FOREGROUND_SERVICE" permission in logs.

As I understand from Google's email, all of FOREGROUND_SERVICE permissions should be reworked in something like that:

  <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />

What do you think about that? @i-bardinov
More info: https://developer.android.com/about/versions/14/changes/fgs-types-required

Godot 4 support?

Hello, are there any plans to tweak this so that it works for Godot 4?

App crashes after calling the review

When I call launchReviewFlow() it crashes. Is there any way to fix this or it's just about compatibility

My Godot v3.4.3. I'm using it on my mobile without uploading it to google play if this makes any diference

License and Privacy Policy

@i-bardinov
Hello, I have few questions

  1. Does the plugin collect any user’s data?
  2. Do I need to add anything to my app's Privacy Policy if I use this plugin?
  3. Do I need to add "License" file to my project if I use this plugin?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.