Skip to content

Instantly share code, notes, and snippets.

[Flurry logEvent:@"Article_Read"];
//after calling FlurryAds.displayAd(mContext, adSpaceName, mAdContainer)
//either onRendered or onRenderFailed will be registerd
@Override
public void onRendered(String adSpace) {
Log.d(kLogTag, "onRendered( " + adSpace + " )");
}
@Override
public void onRenderFailed(String adSpace) {
#import "Flurry.h"
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Your code
//note: iOS only allows one crash reporting tool per app; if using another, set to: NO
[Flurry setCrashReportingEnabled:YES];
public boolean shouldDisplayAd(String adSpaceName, FlurryAdType type) {
// retruning false in this method would prevent the ad from being displayed
return true;
}
#import "ViewController.h"
#import "FlurryAdDelegate.h"
#import "FlurryAds.h"
@interface ViewController ()
@property (nonatomic, retain) UIView *flurryContainer;
@end
@implementation ViewController
#import "ViewController.h"
#import "FlurryAdDelegate.h"
#import "FlurryAds.h"
@interface ViewController ()
@property (nonatomic, retain) UIView *flurryContainer;
@end
@implementation ViewController
NSArray *keys = [NSArray arrayWithObjects:@"user_id", nil];
NSArray *objects = [NSArray arrayWithObjects:@"1234", nil];
NSDictionary *myCookies = [NSDictionary dictionaryWithObjects:objects forKeys:keys];
[FlurryAds setUserCookies:myCookies];
//set keywords
Map<String, String> keywords = new HashMap<String, String>();
keywords.put("ltv", "0");
FlurryAds.setTargetingKeywords(keywords);
//clear keywords
FlurryAds.clearTargetingKeywords();
//to setup cookies
FlurryAgent.setUserCookies(hashMap);
//to remove any user cookies call:
FlurryAgent.clearUserCookies();
FlurryAds.enableTestAds(true);