Search code examples
androidlibgdxinterstitial

integrate libgdx live wallpaper with appflood


i have integrate everything properly. the only problem is when i want to load the ads(any ads of appflood) the example is interstitial ads

AppFlood.showFullScreen(this);

the error is

The method showFullScreen(Activity) in the type AppFlood is not applicable for the arguments (LiveWallpaper)

i ever integrate appflood with my libgdx game that extend AndroidApplication class, but in live wallpaper this doesn't work. i want to make appflood works in libgdx livewallpaper too


Solution

  • This a reply to @newbieUser comment

    AppFlood.initialize(this, "", "", AppFlood.AD_ALL);
    AppFlood.setEventDelegate( new AFEventDelegate() {  
    @Override
    public void onClose(JSONObject arg0) {
    finish();
    }
    
    @Override
    public void onClick(JSONObject arg0) {
    
    }
    });
    
    
    AppFlood.showFullScreen(this);
    

    AppFlood.setEventDelegate is used to add listener