T
- List
of methods that should be used from Publishers.public abstract class AbstractAlertView<T extends com.smaato.soma.StandardPublisherMethods>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected AlertBannerStateListener |
mAlertBannerStateListener
Instance of alertBanner state listener.
|
static java.lang.String |
TAG |
Constructor and Description |
---|
AbstractAlertView(Context context)
Creates an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdListener(AdListenerInterface adListener)
Register an Ad Listener.
The ad listener should implement the AdListenerInterface . |
void |
asyncLoadNewBanner()
Load a new banner.
|
protected abstract AdListenerInterface |
createAdListener()
Should be implemented in children class in order to get the appropriate
AdListenerInterface . |
void |
dismiss()
Close the current dialog.
|
AlertBannerStateListener |
getAlertBannerStateListener()
Get the current banner state listener.
|
protected AlertDialog |
getAlertDialog()
Get the current alert dialog.
PS: This method is susceptible to return null. |
protected Context |
getContext()
Get the current context.
|
java.lang.String |
getTitle()
Get the Alert Titel.
|
UserSettings |
getUserSettings()
Get the current
UserSettings used. |
protected void |
init() |
boolean |
isLocationUpdateEnabled()
Return
true if GPS location is activated, false
otherwise. |
boolean |
removeAdListener(AdListenerInterface adListener)
Unregister an Ad Listener.
The ad listener should implement the AdListenerInterface . |
void |
setAdSpaceId(int adSpaceId)
Set the Ad Space Id.
|
void |
setAlertBannerStateListener(AlertBannerStateListener alertBannerStateListener)
Register the banner state listener.
|
protected void |
setAlertDialog(AlertDialog mAlertDialog)
Set the current alert dialog.
|
protected void |
setContext(Context mContext)
Set the current context.
|
void |
setLocationUpdateEnabled(boolean updateEnabled)
Activate / Deactivate GPS location.
|
void |
setPublisherId(int publisherId)
Set the publisherId.
|
void |
setTitle(java.lang.String title)
Set the Alert Title.
|
protected AlertBannerStateListener mAlertBannerStateListener
AlertBannerStateListener}
public static java.lang.String TAG
public AbstractAlertView(Context context)
protected void init()
public void setPublisherId(int publisherId)
publisherId
- public void setAdSpaceId(int adSpaceId)
adSpaceId
- protected Context getContext()
protected void setContext(Context mContext)
mContext
- public java.lang.String getTitle()
String
public void setTitle(java.lang.String title)
title
- public void addAdListener(AdListenerInterface adListener)
AdListenerInterface
.
The method onReceiveAd will be called each time when a new banner is
downloaded.public boolean removeAdListener(AdListenerInterface adListener)
AdListenerInterface
.
The method onReceiveAd will not be called anymore when a new banner is
downloaded.public void asyncLoadNewBanner()
public void setLocationUpdateEnabled(boolean updateEnabled)
public boolean isLocationUpdateEnabled()
true
if GPS location is activated, false
otherwise.public UserSettings getUserSettings()
UserSettings
used.UserSettings}.
protected AlertDialog getAlertDialog()
AlertDialog
protected void setAlertDialog(AlertDialog mAlertDialog)
mAlertDialog
- public void dismiss()
public AlertBannerStateListener getAlertBannerStateListener()
public void setAlertBannerStateListener(AlertBannerStateListener alertBannerStateListener)
alertBannerStateListener
- AlertBannerStateListener}
protected abstract AdListenerInterface createAdListener()
AdListenerInterface
.AdListenerInterface