|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectRelativeLayout
com.sec.android.ad.AdHubView
public final class AdHubView
The AdHubView class is a base class to obtain an Ad. It can be included in the Layout of the application.
setRefreshRate(int)
)startAd()
to obtain an Ad, and call stopAd()
to cancel the process of obtaining an Ad.
The two methods can be called alternately, depending on the scenario. When an Ad is displayed on the screen and obtaining the next Ad fails, the existing Ad remains unchanged.
Field Summary |
---|
Fields inherited from interface com.sec.android.ad.UserInterface |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AdHubView(Context context)
|
|
AdHubView(Context context,
AttributeSet attrs)
|
|
AdHubView(Context context,
AttributeSet attrs,
int defStyle)
Deprecated. |
|
AdHubView(Context context,
java.lang.String inventoryID,
AdSize adSize)
|
Method Summary | |
---|---|
int |
getRefreshRate()
Gets the currently configured Ad refresh rate. |
int |
getThreadPriority()
Returns the priority of the thread. |
boolean |
hasAdContent()
Checks whether it has a Banner Ad (AdHubView). |
void |
init(Context context,
java.lang.String inventoryID,
AdSize adSize)
This initializes the AdHubView. |
void |
setGeoCoder()
Sets the GeoCoder from location. |
void |
setListener(AdNotificationListener listener)
Sets the Listener. |
void |
setLocation(double latitude,
double longitude)
Sets the location. |
void |
setLocation(double latitude,
double longitude,
double altitude)
Sets the location. |
void |
setProgressBarVisibility(boolean visible)
Deprecated. |
void |
setRefreshRate(int milliseconds)
Updates the Ad refresh period. |
void |
setTextAdBackgroundGradient(int top,
int bottom)
Deprecated. |
void |
setTextAdTextColor(int color)
Deprecated. |
void |
setThreadPriority(int priority)
Sets the priority of the thread. |
void |
setUserProfile(UserProfile profile)
Registers UserProfile. |
void |
startAd()
Request an Ad from the server. |
void |
stopAd()
Cancels the Ad request. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdHubView(Context context, java.lang.String inventoryID, AdSize adSize)
public AdHubView(Context context)
public AdHubView(Context context, AttributeSet attrs)
@Deprecated public AdHubView(Context context, AttributeSet attrs, int defStyle)
Method Detail |
---|
public void init(Context context, java.lang.String inventoryID, AdSize adSize)
context
- ContextinventoryID
- ID of Ad Inventory, which is issued in the SamsungAdHub website.adSize
- size of Ad. Refer to AdSize
public void setListener(AdNotificationListener listener)
listener
- AdNotificationListenerpublic void setRefreshRate(int milliseconds)
milliseconds
- Ad refresh period (unit: milliseconds). Minimum value is 12 seconds and any values smaller than that are ignored. Range: milliseconds >= 12*1000public int getRefreshRate()
public boolean hasAdContent()
public void stopAd()
public void startAd()
startAd
in interface com.sec.android.ad.UserInterface
public void setUserProfile(UserProfile profile)
setUserProfile
in interface com.sec.android.ad.UserInterface
profile
- information such as age, gender, interests, etc.public void setGeoCoder()
setGeoCoder
in interface com.sec.android.ad.UserInterface
public void setLocation(double latitude, double longitude, double altitude)
setLocation
in interface com.sec.android.ad.UserInterface
latitude
- latitude, range: -90 ~ 90longitude
- longitude, range: -180 ~ 180altitude
- altitude, range: Doublepublic void setLocation(double latitude, double longitude)
setLocation
in interface com.sec.android.ad.UserInterface
latitude
- latitude, range: -90 ~ 90longitude
- longitude, range: -180 ~ 180public void setThreadPriority(int priority)
setThreadPriority
in interface com.sec.android.ad.UserInterface
priority
- The new thread priority setting.
It must be less than AdHubView.MAX_PRIORITY(10) and greater than AdHubView.MIN_PRIORITY(1).
The default value is AdHubView.NORM_PRIORITY(5).public final int getThreadPriority()
getThreadPriority
in interface com.sec.android.ad.UserInterface
@Deprecated public void setProgressBarVisibility(boolean visible)
@Deprecated public void setTextAdTextColor(int color)
@Deprecated public void setTextAdBackgroundGradient(int top, int bottom)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |