Android Question About appflood lib

hanyelmehy

Active Member
Licensed User
i try to make lib for appflood
but i get this error :
B4X:
java.lang.NoClassDefFoundError: com.google.android.gms.ads.identifier.AdvertisingIdClient
    at com.appflood.e.c$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:856)
i use
B4X:
 #AdditionalRes: Mypath\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
in my code
 

hanyelmehy

Active Member
Licensed User
Hi,
i already make update for Google Play Services and copy updated google-play-services.jar to the additional libraries folder and still get the same error message
 

ilan

Expert
Licensed User
i try to make lib for appflood
but i get this error :
B4X:
java.lang.NoClassDefFoundError: com.google.android.gms.ads.identifier.AdvertisingIdClient
    at com.appflood.e.c$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:856)
i use
B4X:
 #AdditionalRes: Mypath\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
in my code

hi hanyelmehy,

can you share the lib please :)
 

hanyelmehy

Active Member
Licensed User
hi hanyelmehy,

can you share the lib please :)
Please Check:
B4X:
package b4a.appflood.lib;



import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.ActivityObject;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;

import com.appflood.AFBannerView;
import com.appflood.AppFlood;





@ShortName("AppFloodB4A")
@Version(2.0f)
@ActivityObject
@DependsOn(values={"appflood-2.24","google-play-services"})
@Author("Elmihy")


public class AppFloodB4A {
/////////////////////////////////////////////////////////////////////////////////////////////////    
     private BA ba;
    
     public static final int BANNER_POSITION_TOP = AppFlood.BANNER_POSITION_TOP;
     public static final int BANNER_POSITION_BOTTOM = AppFlood.BANNER_POSITION_BOTTOM;
     public static final int BANNER_SMALL = AppFlood.BANNER_SMALL;
     public static final int BANNER_MIDDLE = AppFlood.BANNER_MIDDLE;
     public static final int BANNER_LARGE = AppFlood.BANNER_LARGE;
     public static final int BANNER_WEB_FULLSCREEN = AppFlood.BANNER_WEB_FULLSCREEN;
     public static final int BANNER_WEB_VIDEO = AppFlood.BANNER_WEB_VIDEO;
     public static final int BANNER_INTERSTITIAL = AppFlood.BANNER_INTERSTITIAL;
   
     public void Initialize(BA ba,String APPKey,String SecretKey)
        {
             this.ba = ba;
             AppFlood.initialize(ba.context, APPKey, SecretKey, AppFlood.AD_ALL);
        }
   
     public void ShowFullScreen()
        {
         AppFlood.showFullScreen(ba.activity);
        }
     public void ShowPanel()
        {
         AppFlood.showPanel(ba.activity,AppFlood.PANEL_BOTTOM);
        }
     public void ShowList()
        {
         AppFlood.showList(ba.activity,AppFlood.LIST_TAB_APP);
        }
     public void ShowInterstitial()
        {
         AppFlood.showInterstitial(ba.activity);
        }
     public void ShowSimpleBanner(){
        
         AppFlood.showBanner(ba.activity,AppFlood.BANNER_POSITION_BOTTOM,AppFlood.BANNER_SMALL);
        
     }

   public void ShowSimpleBannerTop(){
        
         AppFlood.showBanner(ba.activity,AppFlood.BANNER_POSITION_TOP,AppFlood.BANNER_SMALL);
        
     }
  
   public void ShowCustomeBanner(int Pos,int BType){
         AppFlood.showBanner(ba.activity,Pos, BType);
     }
            
   
////////////////////////////////////////////////////////////////////////////////////////////////
}
 

ilan

Expert
Licensed User
Please Check:
B4X:
package b4a.appflood.lib;



import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.ActivityObject;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;

import com.appflood.AFBannerView;
import com.appflood.AppFlood;





@ShortName("AppFloodB4A")
@Version(2.0f)
@ActivityObject
@DependsOn(values={"appflood-2.24","google-play-services"})
@Author("Elmihy")


public class AppFloodB4A {
/////////////////////////////////////////////////////////////////////////////////////////////////   
     private BA ba;
   
     public static final int BANNER_POSITION_TOP = AppFlood.BANNER_POSITION_TOP;
     public static final int BANNER_POSITION_BOTTOM = AppFlood.BANNER_POSITION_BOTTOM;
     public static final int BANNER_SMALL = AppFlood.BANNER_SMALL;
     public static final int BANNER_MIDDLE = AppFlood.BANNER_MIDDLE;
     public static final int BANNER_LARGE = AppFlood.BANNER_LARGE;
     public static final int BANNER_WEB_FULLSCREEN = AppFlood.BANNER_WEB_FULLSCREEN;
     public static final int BANNER_WEB_VIDEO = AppFlood.BANNER_WEB_VIDEO;
     public static final int BANNER_INTERSTITIAL = AppFlood.BANNER_INTERSTITIAL;
  
     public void Initialize(BA ba,String APPKey,String SecretKey)
        {
             this.ba = ba;
             AppFlood.initialize(ba.context, APPKey, SecretKey, AppFlood.AD_ALL);
        }
  
     public void ShowFullScreen()
        {
         AppFlood.showFullScreen(ba.activity);
        }
     public void ShowPanel()
        {
         AppFlood.showPanel(ba.activity,AppFlood.PANEL_BOTTOM);
        }
     public void ShowList()
        {
         AppFlood.showList(ba.activity,AppFlood.LIST_TAB_APP);
        }
     public void ShowInterstitial()
        {
         AppFlood.showInterstitial(ba.activity);
        }
     public void ShowSimpleBanner(){
       
         AppFlood.showBanner(ba.activity,AppFlood.BANNER_POSITION_BOTTOM,AppFlood.BANNER_SMALL);
       
     }

   public void ShowSimpleBannerTop(){
       
         AppFlood.showBanner(ba.activity,AppFlood.BANNER_POSITION_TOP,AppFlood.BANNER_SMALL);
       
     }
 
   public void ShowCustomeBanner(int Pos,int BType){
         AppFlood.showBanner(ba.activity,Pos, BType);
     }
           
  
////////////////////////////////////////////////////////////////////////////////////////////////
}


sorry but i dont know how to make libs...
is there any lib for Appflood??
 

hanyelmehy

Active Member
Licensed User
sorry but i dont know how to make libs...
is there any lib for Appflood??
sorry ,i did not see your message ,Please check file attached

How to use:
B4X:
Add All Files to lib Folder
use :
#AdditionalRes: your path\google-play-services_lib\res, com.google.android.gms
Dim MyAppFlood As AppFloodB4A
MyAppFlood.Initialize("APPKey","SecretKey")
MyAppFlood.ShowSimpleBanner
check also other method
 

Attachments

Top