robovm / robovm-robopods

63 stars 86 forks source link

Chartboost doesn't call ChartboostDelegateAdapter.didCompleteRewardedVideo(...) #25

Closed wsrdzg closed 9 years ago

wsrdzg commented 9 years ago

I watch a rewarded video but no method of ChartboostDelegateAdapter is called except for didCacheRewardedVideo(...). That's a problem, because I need to know if the user has completed the rewarded video.

tajny commented 9 years ago

any progress on this ?

BlueRiverInteractive commented 9 years ago

No progress yet, I'm afraid.

I quickly took a look at where the ChartboostDelegate is used and it seems that you can only specify it when you initialize Chartboost. That's certainly an issue because the delegate object will be passed to native but is nowhere referenced on the Java side. So the GC will collect the delegate after some time.

I'm not sure if this will solve this particular issue but you could try to store your ChartboostDelegateAdapter object as a class field. At least this should prevent the GC from collecting it to early.

tajny commented 9 years ago

Yes, you're right it is garbage collected, after making final field with it it works as expected:))

BlueRiverInteractive commented 9 years ago

Awesome! I will add this fix to the robopod then.