Skip to content

Instantly share code, notes, and snippets.

//To set keywords
NSArray *keys = [NSArray arrayWithObjects:@"subsriber", nil];
NSArray *objects = [NSArray arrayWithObjects:@"0", nil];
NSDictionary *keywords = [NSDictionary dictionaryWithObjects:objects forKeys:keys];
[FlurryAds setKeywordsForTargeting:keywords];
//To clear the set keywords call
//set keywords
Map<String, String> keywords = new HashMap<String, String>();
keywords.put("subscriber", "0");
FlurryAds.setTargetingKeywords(keywords);
//clear keywords
FlurryAds.clearTargetingKeywords();
- ­keep class com.flurry.** { *; }
- ­dontwarn com.flurry.**
- ­keepattributes *Annotation*,EnclosingMethod
- ­keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
# Google Play Services library
# Preserve GMS ads classes
- ­keep class com.google.android.gms.ads.** { *; }
- ­dontwarn com.google.android.gms.ads.**
# Preserve InMobi Ads classes
- ­keep class com.inmobi.** { *; }
- ­dontwarn com.inmobi.**
# Preserve Millennial Ads classes

- ­keep class com.millennialmedia.** { *; }
- ­dontwarn com.millennialmedia.**
# Preserve Facebook Ads classes
- ­keep class import com.facebook.** { *; }
- ­dontwarn com.facebook.**
// Capture author info & user status
Map<String, String> articleParams = new HashMap<String, String>();
articleParams.put("Author", "John Q");
articleParams.put("User_Status", "Registered");
//Log the timed event when the user starts reading the article
//setting the third param to true creates a timed event
FlurryAgent.logEvent("Article_Read", articleParams, true);
//...
FlurryAgent.logEvent("Article_Read");
// Capture author info & user status
Map<String, String> articleParams = new HashMap<String, String>();
//param keys and values have to be of String type
articleParams.put("Author", "John Q");
articleParams.put("User_Status", "Registered");
//up to 10 params can be logged with each event
FlurryAgent.logEvent("Article_Read", articleParams);