@Deprecated public class FlurryAds extends Object
Modifier and Type | Method and Description |
---|---|
static void |
clearLocation()
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
clearTargetingKeywords()
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
clearUserCookies()
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
displayAd(Context context,
String adSpace,
ViewGroup viewGroup)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
enableTestAds(boolean test)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
fetchAd(Context context,
String adSpace,
ViewGroup viewGroup,
FlurryAdSize size)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static boolean |
getAd(Context context,
String adSpace,
ViewGroup viewGroup,
FlurryAdSize size,
long timeout)
Deprecated.
We recommend using the asynchronous ad serving flow with
fetchAd(android.content.Context, java.lang.String, android.view.ViewGroup, com.flurry.android.FlurryAdSize) ,
displayAd(android.content.Context, java.lang.String, android.view.ViewGroup) |
static void |
initializeAds(Context context)
Deprecated.
initializeAds is now handled automatically.
|
static boolean |
isAdAvailable(Context context,
String adSpace,
FlurryAdSize size,
long timeout)
Deprecated.
We recommend using the asynchronous ad serving flow with
fetchAd(android.content.Context, java.lang.String, android.view.ViewGroup, com.flurry.android.FlurryAdSize) ,
displayAd(android.content.Context, java.lang.String, android.view.ViewGroup) |
static boolean |
isAdReady(String adSpace)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
removeAd(Context context,
String adSpace,
ViewGroup viewGroup)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
setAdListener(FlurryAdListener listener)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
setCustomAdNetworkHandler(ICustomAdNetworkHandler handler)
Deprecated.
Sets the class which handles custom ad networking.
|
static void |
setLocation(float lat,
float lon)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
setTargetingKeywords(Map<String,String> targetingKeywords)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
static void |
setUserCookies(Map<String,String> userCookies)
Deprecated.
We recommend using the new object-based APIs in the com.flurry.android.ads package.
|
@Deprecated public static boolean getAd(Context context, String adSpace, ViewGroup viewGroup, FlurryAdSize size, long timeout)
fetchAd(android.content.Context, java.lang.String, android.view.ViewGroup, com.flurry.android.FlurryAdSize)
,
displayAd(android.content.Context, java.lang.String, android.view.ViewGroup)
context
- A reference to a Context object such as an Activity or an Service.adSpace
- The placement of the ad within your app. For example, for a splash screen ad,
it might be named "SPLASH_SCREEN"viewGroup
- The ViewGroup into which the ad will be placed if the returned ad is a
banner. In the case that the ad returned is a full screen ad, a Flurry built
Activity will be launched which contains the ad, and the viewGroup that is passed
in will be ignored. In most cases this should be an instance of RelativeLayout. If
it's another subclass of ViewGroup, the alignment will be ignored, and the ad will
be added to the ViewGroup with basic layout settings only.size
- The default size of the adSpace. This can be overridden on the server. See
FlurryAdSize for more details.timeout
- The maximum amount of time to wait for the server to return a result. Set this
to 0 to conduct this operation in the background.@Deprecated public static void initializeAds(Context context)
context
- A reference to a Context object such as an Activity or an Service.@Deprecated public static boolean isAdAvailable(Context context, String adSpace, FlurryAdSize size, long timeout)
fetchAd(android.content.Context, java.lang.String, android.view.ViewGroup, com.flurry.android.FlurryAdSize)
,
displayAd(android.content.Context, java.lang.String, android.view.ViewGroup)
context
- A reference to a Context object such as an Activity or an Service.adSpace
- The placement of the ad within your app. For example, for a splash screen ad,
it might be named "SPLASH_SCREEN"size
- The default size of the adSpace. This can be overridden on the server. See
FlurryAdSize for more details.timeout
- The maximum amount of time to wait for the server to return a result. Set this
to 0 to check the cache and return immediately.@Deprecated public static boolean isAdReady(String adSpace)
adSpace
- The placement of the ad within your app. For example, for a splash screen ad,
it might be named "SPLASH_SCREEN"@Deprecated public static void fetchAd(Context context, String adSpace, ViewGroup viewGroup, FlurryAdSize size)
context
- A reference to a Context object such as an Activity or an Service.adSpace
- The placement of the ad within your app. For example, for a splash screen ad,
it might be named "SPLASH_SCREEN"size
- The default size of the adSpace. This can be overridden on the server. See
FlurryAdSize for more details.@Deprecated public static void displayAd(Context context, String adSpace, ViewGroup viewGroup)
@Deprecated public static void removeAd(Context context, String adSpace, ViewGroup viewGroup)
@Deprecated public static void setAdListener(FlurryAdListener listener)
listener
- Your implementation of FlurryAdListenerfetchAd(Context, String, ViewGroup, FlurryAdSize)
@Deprecated public static void setLocation(float lat, float lon)
lat
- The latitudelon
- The longitude@Deprecated public static void clearLocation()
public static void setCustomAdNetworkHandler(ICustomAdNetworkHandler handler)
@Deprecated public static void setUserCookies(Map<String,String> userCookies)
Map<String,String>
of key/value pairs that will be transmitted to the Flurry
servers when an ad is clicked. UserCookies allow the developer to specify information on a
user executing an ad action. There is one UserCookie object, and on each ad click that
UserCookie is transmitted to the Flurry servers. The UserCookie key/value pairs will be
transmitted back to the developer via the app callback if one is set.
//From the main Activity of the app
public void onStart() {
FlurryAgent.onStartSession(this, myApiKey);
//Create a Map<String,String> to hold the user cookies
Map<String, String> uCookies = new HashMap<String, String>();
uCookies.put("userId", getUserId());
FlurryAgent.setUserCookies(uCookies);
}
userCookies
- for clearing the user cookies
@Deprecated public static void clearUserCookies()
setUserCookies(Map)
@Deprecated public static void setTargetingKeywords(Map<String,String> targetingKeywords)
Map<String,String>
of key/value pairs to send to the Flurry servers when an ad is
requested. Keywords allow the developer to specify information on a user executing an ad
action for the purposes of targeting. There is one keywords object that is transmitted
to the Flurry servers on each ad request. If corresponding keywords are matched on the
ad server, a subset of targeted ads will be delivered. This allows partners to supply
information they track internally, which is not available to Flurry's targeting
system.
//From the main Activity of the app
public void onStart() {
FlurryAgent.onStartSession(this, myApiKey);
//Create a Map of keywords
Map<String, String> keywords = new HashMap<String, String>();
keywords.put("favoriteColor", getFavoriteColor());
FlurryAgent.setTargetingKeywords(keywords);
}
targetingKeywords
- A Map<String,String>
of key/value keywordsclearTargetingKeywords()
@Deprecated public static void clearTargetingKeywords()
setTargetingKeywords(Map)
@Deprecated public static void enableTestAds(boolean test)
test
-