Google in-app review API in solar2d

Is it possible now/has anyone tried to use google in app review API in their games? Anyone know of a plugin for this? Any ideas how to make one?

We are no longer supported. Development Team Corona is gone. Let’s move to another platform and Unity is the best choice

Since this is pretty new stuff on Google’s end, I doubt there is a plugin for that right now but someone will make this eventually. If you want to create one yourself, you can take a look at Coding Plugins and Plugin Projects guides.



(Not cool @Trung_Kien_Tran. Solar2D is still being developed and entirely open source meaning that you can also contribute to the development like everyone else.)

4 Likes

If you don’t follow the forums beyond asking for help on your issues, follow the project on GitHub, or if you don’t receive the monthly state of Solar2D emails, then you are missing out on a lot of information.

Solar2D development is much more active than it was during Corona Labs Inc. days.

3 Likes

This should be easy to add via a plugin. Will see I can make something up real quick

2 Likes

thanks for the responses guys! Happy to help with testing or dev if someone can point me in the right direction.

Scott, that would be very nice!

Looking for this too! It’ll be a perfect complement to Scott’s existing iOS review plugin.

This has been added to review plugin on solar2d marketplace

https://scotth.tech/plugin-reviewPopUp

2 Likes

Wow! great work. I’ll try this out ASAP.

Thanks so much!

I was wondering, what happens if this plugin is required/used on older iOS/Android versions than 10.3 and 5.0? Do we need to check for the version ourselves or will the plugin handle that and provide some status info?

You may want to version check, I feel like 99% of device are iOS 10.3 and Android 5.

Hi Scott - I’ve finally got around to implementing this in my game. I’m not sure of the setup from your docs - how does the review popup know what game the review is for? In the build settings you show;
marketplaceId = “insert marketplace account ID”
is that my google account number for the app ID ? I’m just a bit confused as to how it knows which app this review is for…

He would correct me if I’m wrong but marketplace account ID is your account ID on Solar2dmarketplace.com.

I don’t know how the plugin works but I assume it takes package name automatically. There is no mention of package name in the documentation so this should be how it works.

Yes I think thats it - but my problem now is it doesn’t seem to work. I’m pretty sure my plugin is uptodate, but I get this error when I try to call init;

12:04:13.109 ERROR: Runtime error
12:04:13.109 E:\CoronaProjects\MonkeyDiver\mglib\util.lua:199: attempt to call field ‘init’ (a nil value)
12:04:13.109 stack traceback:
12:04:13.109 E:\CoronaProjects\MonkeyDiver\mglib\util.lua:199: in function ‘showReviewPopup’
12:04:13.109 E:\CoronaProjects\MonkeyDiver\overlay_ui.lua:244: in function ‘onClick’
12:04:13.109 E:\CoronaProjects\MonkeyDiver\mgui\mgTree.lua:274: in function ‘handleButtonEvent’
12:04:13.109 E:\CoronaProjects\MonkeyDiver\mgui\mgTree.lua:408: in function ‘_onEvent’
12:04:13.109 D:\a\corona\corona\subrepos\widget\widgetLibrary\widget_button.lua:120: in function ‘manageButtonTouch’
12:04:13.109 D:\a\corona\corona\subrepos\widget\widgetLibrary\widget_button.lua:658: in function ‘method’
12:04:13.109 D:\a\corona\corona\platform\resources\init.lua:220: in function <D:\a\corona\corona\platform\resources\init.lua:189>

Plugin seems to have been updated - but there is no ‘init’ function on this plugin.

This is the code I am using - based on the example provided, but there doesn’t seem to be an ‘init’ function in this plugin ?!? I dump out the review pop up object, and it seems to have a show function but not an ‘init’ one. Are you sure the online plugin is uptodate?

t.reviewPopUp = require “plugin.reviewPopUp”

		t.reviewPopUp.init(function (e)
			print(e.status)
			if e.status == "ready" then
				t.reviewPopUp.show()
			end
		end)

Are you using the plugin for solar2dmarketplace? Also this for Android, Sim, or iOS?

I’ll be using it for android - but this is in the windows sim environment right now. Because it failed in the sim I haven’t tried in on my phone yet.

hey - just tested on android phone and it works great! Just fails in the windows sim environment with a nil reference. Not sure if this is something you want to fix, but it is probably something that should be noted in the docs.
BTW - I was testing from my game downloaded from internal test off my google play developer account - not sure if it works when I load directly onto my phone.

Excellent work though - thanks Scott!

1 Like