Java Question help for add attribute of type activity

frederick

New Member
Licensed User
Longtime User
I add a function android to Basic4 android like this

public void Sans_pop_up(BA ApplicationContext)
{

starappSDK.LoadawllAd(ApplicationContext.applicationContext);

}

I also post an attribute of type Context

but when I add another function and I post attribute of type Activity

like this he doesn't work

public void LoadSlideAd(BA activity)
{


starappSDK.LoadSlideAd(activity.activity.getParent());//I need attribute of type activity in this line

}
can you give me how can I add attribute of type Activity to this function

best regard
 

barx

Well-Known Member
Licensed User
Longtime User
I believe you should pass activities as Object.

B4X:
public void LoadSlideAd(BA ba, Object Activity) {

}
 
Top