I‘ve developed a game in Love2d (Lua), and used love-android as the tool to make it run on android-studio. The game works perfectly in Android devices, so now I’m trying to add billingclient.

My problem is, the Project created by love-android has only 1 activity (gameActivity) that extends SdlActivity. Somehow it runs the zipped game .love, but it has no layouts.

So, when I create a button so players can buy in-apps, I set a layout. But after the onClick, I cannot get rid of this button layout, because I have no layout to setContentView back. I’ve also tried to hide the billing layout with “GONE”, “INVISIBLE”, button.enable(false), but it just goes to a black screen. Since I’m new to Android Studio and still haven’t found how the game runs after the android tool is used, I’m not sure even if it is still running after I call this button. Any suggestion on how can I implement a full working button in such case?

If you need more info, I’d be happy to provide it.

0

There are 0 best solutions below