libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
224 stars 83 forks source link

"Integration example with resolvers" constructors aren't coherent #151

Closed fmmarzoa closed 5 years ago

fmmarzoa commented 7 years ago

This document:

https://github.com/libgdx/gdx-pay/wiki/Integration-example-with-resolvers

Creates a base abstract class which only constructor is as follows:

public abstract class PlatformResolver {
...
    public PlatformResolver () {    }

That's, no code, no arguments. The real issue is the lack of arguments, because just one step further, when it starts derivating such abstract class to create the platform-specific resolver, it tries to call that constructor using one argument. Let's take the Android example:

public class AndroidResolver extends PlatformResolver {
...
    public AndroidResolver(Tanks tanks, AndroidApplication androidApplication) {
         super(tanks);
...

So either the PlatformResolver constructor should take one argument, or the AndroidResolver (and other specific resolvers) should not be calling super(tanks).

MrStahlfelge commented 5 years ago

The page will get removed soon and an example project will be provided, see #104