godot-applovin-max icon indicating copy to clipboard operation
godot-applovin-max copied to clipboard

Rewarded callbacks not firing properly

Open slasktotten opened this issue 3 years ago • 2 comments

First off great work with Nativelibs! A lot of it is working surprisingly well and is quite easy to setup.

Maybe this is me misunderstanding how the callbacks are meant to work but it seems like they all just fire after i've finished a rewarded ad?

I am currently running in test mode if that makes a difference. This is my logcat output.

10-26 14:32:24.465  8163  8212 I godot   : pressed applovin max
10-26 14:33:16.386  8163  8212 I godot   : open rewarded video ad
10-26 14:33:16.386  8163  8212 I godot   : rewarded video ad started
10-26 14:33:16.387  8163  8212 I godot   : rewarded video ad completed
10-26 14:33:16.387  8163  8212 I godot   : on rewarded
10-26 14:33:16.828  8163  8212 I godot   : rewarded video ad closed

Godot:

class RewardedAd:
	signal reward_loaded(id)
	
	func _on_rewarded_video_ad_loaded(id: String):
		emit_signal("reward_loaded", id)

	func  _on_rewarded_video_ad_failed_to_load(id: String, error: String):
		print("failed to loaded rewarded ad")
		pass

	func _on_rewarded_video_ad_opened(id: String):
		print("open rewarded video ad")
		pass

	func _on_rewarded_video_ad_left_application(id: String):
		print("rewarded ad left application")
		pass

	func _on_rewarded_video_ad_closed(id: String):
		print("rewarded video ad closed")
		pass

	func _on_rewarded_video_started(id: String):
		print("rewarded video ad started")
		pass

	func _on_rewarded_video_completed(id: String):
		print("rewarded video ad completed")
		pass

	func _on_rewarded(id: String, reward: String, amount: int):
		print("on rewarded")
		pass

slasktotten avatar Oct 26 '21 11:10 slasktotten

It fires events internally at right time, but they will be processed by godot only when the main view of you application became active.

DrMoriarty avatar Oct 26 '21 12:10 DrMoriarty

That makes sense, thx!

slasktotten avatar Oct 26 '21 14:10 slasktotten