Classes | Public Types | Public Member Functions | Protected Member Functions | Package Functions | Package Attributes | Static Package Attributes

com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView Class Reference

Inherits android::view::View.

List of all members.

Classes

interface  AFAdSDKSashimiAssetsReceivedListener
interface  AFAdSDKSashimiClickListener
interface  AFAdSDKSashimiDisplayListener

Public Types

enum  AFAdSDKSashimiStyleMode { AFAdSDKSashimiMinimalStyleModeLight, AFAdSDKSashimiMinimalStyleModeDark }
enum  AFAdSDKSashimiAssetTypeface { AFAdSDKSashimiAssetTypefaceRegular, AFAdSDKSashimiAssetTypefaceBold, AFAdSDKSashimiAssetTypefaceBlack }
enum  AFAdSDKSashimiAssetBitmap { AFAdSDKSashimiAssetBitmapAdBadgeLight, AFAdSDKSashimiAssetBitmapAdBadgeDark, AFAdSDKSashimiAssetBitmapRoundedMask }

Public Member Functions

 AFAdSDKSashimiView (String zoneId, Context context, Ad ad, AFAdSizeProvider sizeProvider)
void setOnAssetsReceivedListener (AFAdSDKSashimiAssetsReceivedListener listener)
void setOnDisplayListener (AFAdSDKSashimiDisplayListener listener)
void setOnClickListener (AFAdSDKSashimiClickListener listener)
void onAssetsReceived (Bitmap adIconBitmap, Bitmap adScreenshotBitmap)
Bitmap getAdIconBitmap ()
Bitmap getAdScreenshotBitmap ()
void setAppDetails (long nAppId, long nCampaignId, String strAdAppPackageName, AFFlatAdType nFlatType, AFAdSDKPrivateAdDisplayEvents adDisplayEvents)
void finish ()
void trackDismissal (boolean bByUser)
long getAdAppId ()
AFFlatAdType getFlatAdType ()
AFAdSDKSashimiStyleMode getStyleMode ()
void setStyleMode (AFAdSDKSashimiStyleMode styleMode)
Typeface getTypeface (AFAdSDKSashimiAssetTypeface asset)
BitmapDrawable getAssetDrawable (AFAdSDKSashimiAssetBitmap asset)
Bitmap multiplyBitmaps (Bitmap bm1, Bitmap bm2)
int getContentBackgroundColor ()
void setContentBackgroundColor (int nColor)
CharSequence getTitleText ()
void setTitleText (CharSequence titleText)
int getTitleTextColor ()
void setTitleTextColor (int nColor)
CharSequence getCategoryText ()
void setCategoryText (CharSequence categoryText)
int getCategoryTextColor ()
void setCategoryTextColor (int nColor)
CharSequence getTaglineText ()
void setTaglineText (CharSequence taglineText)
int getTaglineTextColor ()
void setTaglineTextColor (int nColor)
CharSequence getPriceText ()
void setPriceText (CharSequence priceText)
int getPriceTextColor ()
void setPriceTextColor (int nColor)
int getPriceBackgroundColor ()
void setPriceBackgroundColor (int nColor)
boolean canDrawPrice ()
int getCallToActionButtonColor (boolean bPushed)
void setCallToActionButtonColor (boolean bPushed, int nColor)
int getIconBorderColor ()
void setIconBorderColor (int nColor)
int getBlurOverlayColor ()
void setBlurOverlayColor (int nColor)
float getBlurRadius ()
void setBlurRadius (float fRadius)
void internalCleanup ()
String getIconURL ()
List< String > getScreenshotURLs ()
String getAppName ()
String getAppCategory ()
String getAppTagline ()
boolean isFree ()
Double getStarRating ()
String getCallToActionButtonText ()
String getDestinationURL ()
void reportImpression ()
void reportClick ()
Bitmap getExtScreenshotAsBitmap (float fBlurRadius, int dw, int dh)

Protected Member Functions

void onAdClicked ()
void onMeasure (int widthMeasureSpec, int heightMeasureSpec)
void onSizeChanged (int w, int h, int oldw, int oldh)

Package Functions

void onCheckForImpression ()
void onSashimiAdImpression ()

Package Attributes

String m_zoneId
Context m_context
Ad m_ad
AFAdSDKSashimiAssetsReceivedListener m_assetsReceivedListener
AFAdSDKSashimiDisplayListener m_displayListener
AFAdSDKSashimiClickListener m_clickListener
Bitmap m_adIconBitmap
Bitmap m_adScreenshotBitmap
boolean m_bDisplayNotified
boolean m_bAssetsReceived
AFAdSizeProvider m_sizeProvider
long m_nAdAppId
long m_nCampaignId
AFFlatAdType m_nFlatAdType
AFAdSDKPrivateAdDisplayEvents m_adDisplayEvents
String m_strAdAppPackageName
String m_strAdAppName = ""
String m_strAdAppCategory = ""
String m_strAdAppDescription = ""
String m_strAdAppPrice = ""
Timer m_impressionCheckTimer = null
int m_nImpressionCheckState = 0

Static Package Attributes

static final String CLASS_TAG = "AFAdSDK.AFAdSDKSashimiView"

Member Enumeration Documentation

Standard bitmap assets

Enumerator:
AFAdSDKSashimiAssetBitmapAdBadgeLight 

Ad badge for the light style mode

AFAdSDKSashimiAssetBitmapAdBadgeDark 

Ad badge for the dark style mode

AFAdSDKSashimiAssetBitmapRoundedMask 

Rounded mask

Standard typeface assets

Enumerator:
AFAdSDKSashimiAssetTypefaceRegular 

Regular typeface for ads

AFAdSDKSashimiAssetTypefaceBold 

Bold typeface for ads

AFAdSDKSashimiAssetTypefaceBlack 

Black typeface for ads

Display style

Enumerator:
AFAdSDKSashimiMinimalStyleModeLight 

Light style mode, great for integration in light interfaces.

AFAdSDKSashimiMinimalStyleModeDark 

Dark style mode, great for integration in dark interfaces.


Constructor & Destructor Documentation

com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.AFAdSDKSashimiView ( String  zoneId,
Context  context,
Ad  ad,
AFAdSizeProvider  sizeProvider 
)

Constructor

Parameters:
zoneId zone ID for ad
context application context
ad ad being presented
sizeProvider instance of a AFAdSizeProvider that provides the size in pixels for this ad when created and when the screen size changes

Member Function Documentation

boolean com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.canDrawPrice (  ) 

Check if we are allowed to draw the price banner for this ad

Returns:
true if allowed to draw, false if not
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.finish (  ) 

Remove view, free resources

long com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAdAppId (  ) 

Get AppId of the displayed ad

Returns:
appID
Bitmap com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAdIconBitmap (  ) 

Get icon bitmap, when the assets have been received

Returns:
icon bitmap
Bitmap com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAdScreenshotBitmap (  ) 

Get screenshot bitmap, when the assets have been received

Returns:
screenshot bitmap
String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAppCategory (  ) 

Get the advertised app's category

Returns:
name
String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAppName (  ) 

Get the advertised app's name

Returns:
name
String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAppTagline (  ) 

Get the advertised app's tagline

Returns:
tagline
BitmapDrawable com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getAssetDrawable ( AFAdSDKSashimiAssetBitmap  asset  ) 

Get drawable for a standard bitmap asset

Parameters:
asset bitmap asset to get drawable for
Returns:
drawable, null if asset is unknown
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getBlurOverlayColor (  ) 

Get color used to overlay the blurred artwork image for the extended format

Returns:
overlay color
float com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getBlurRadius (  ) 

Get the blur radius for the extended format's background

Returns:
blur radius
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getCallToActionButtonColor ( boolean  bPushed  ) 

Get the color of the call to action button

Parameters:
bPushed true to get the color in the pushed-down state, false to get the color in the normal state
Returns:
button color
String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getCallToActionButtonText (  ) 

Get the text displayed on the call to action button for this ad

Returns:
call to action button text, such as "DOWNLOAD"
CharSequence com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getCategoryText (  ) 

Get application category

Returns:
application category
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getCategoryTextColor (  ) 

Get the color of the application category

Returns:
label color
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getContentBackgroundColor (  ) 

Get background color for the content

Returns:
background color
String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getDestinationURL (  ) 

Get the destination URL that is opened when this ad is clicked on

Returns:
destination URL
Bitmap com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getExtScreenshotAsBitmap ( float  fBlurRadius,
int  dw,
int  dh 
)

Get bitmap of this Sashimi ad

Parameters:
fBlurRadius blur radius
dw width of the bitmap to create, in pixels
dh height of the bitmap to create, in pixels
Returns:
bitmap
AFFlatAdType com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getFlatAdType (  ) 

Get flat type of the displayed ad

Returns:
ad type
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getIconBorderColor (  ) 

Get color for the border around the app's icon

Returns:
border color
String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getIconURL (  ) 

Get the url of the advertised app's icon

Returns:
url
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getPriceBackgroundColor (  ) 

Get background color for the price tag

Returns:
background color
CharSequence com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getPriceText (  ) 

Get application's price

Returns:
application's price
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getPriceTextColor (  ) 

Get the color of the application's price

Returns:
label color
List<String> com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getScreenshotURLs (  ) 

Get the urls of the advertised app's screenshots

Returns:
url
Double com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getStarRating (  ) 

Get star rating for the app

Returns:
star rating of the app, or a value < 0 if unknown
AFAdSDKSashimiStyleMode com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getStyleMode (  ) 

Get style mode

Returns:
style mode
CharSequence com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getTaglineText (  ) 

Get application tagline

Returns:
application tagline
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getTaglineTextColor (  ) 

Get the color of the application tagline

Returns:
label color
CharSequence com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getTitleText (  ) 

Get application title

Returns:
application title
int com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getTitleTextColor (  ) 

Get the color of the application title

Returns:
label color
Typeface com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.getTypeface ( AFAdSDKSashimiAssetTypeface  asset  ) 

Get standard typeface

Parameters:
asset typeface asset to get
Returns:
typeface, null if asset is unknown
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.internalCleanup (  ) 

Clean up internally; called even if finish() is derived and this superclass not called

boolean com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.isFree (  ) 

Check if the advertised app is a free one

Returns:
true if free, false if paid
Bitmap com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.multiplyBitmaps ( Bitmap  bm1,
Bitmap  bm2 
)

Create a bitmap by multiplying the color and alpha values of pixels in two bitmaps

Parameters:
bm1 first bitmap (for instance an icon), provides the size of the multiplied bitmap
bm2 second bitmap (for instance a mask), stretched to the size of the first bitmap
Returns:
multiplied bitmap
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.onAdClicked (  )  [protected]

React to ad being clicked

void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.onAssetsReceived ( Bitmap  adIconBitmap,
Bitmap  adScreenshotBitmap 
)

Provide assets to the sashimi

Parameters:
adIconBitmap bitmap to use for the ad's icon
adScreenshotBitmap bitmap to use for the ad's screenshot
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.onCheckForImpression (  )  [package]

Check for impression

void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.onMeasure ( int  widthMeasureSpec,
int  heightMeasureSpec 
) [protected]

Measure the view size

void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.onSashimiAdImpression (  )  [package]

Record ad impression event

void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.onSizeChanged ( int  w,
int  h,
int  oldw,
int  oldh 
) [protected]

Handle initial size or size change, see ViewGroup.onSizeChanged()

Parameters:
w new width
h new height
oldw previous width
oldh old height
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.reportClick (  ) 

Report this ad as clicked

void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.reportImpression (  ) 

Report this ad as seen

void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setAppDetails ( long  nAppId,
long  nCampaignId,
String  strAdAppPackageName,
AFFlatAdType  nFlatType,
AFAdSDKPrivateAdDisplayEvents  adDisplayEvents 
)

Set app details for the ad being served

Parameters:
nAppId appID
nCampaignId campaign ID
nFlatType flat ad type
adDisplayEvents internal events callback
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setBlurOverlayColor ( int  nColor  ) 

Set color used to overlay the blurred artwork image for the extended format

Parameters:
nColor new overlay color, such as 0x4cffffff
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setBlurRadius ( float  fRadius  ) 

Set the blur radius for the extended format's background

Parameters:
fRadius new blur radius, such as 30.0f
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setCallToActionButtonColor ( boolean  bPushed,
int  nColor 
)

Set the color of the application title (defaults to the style's title color)

Parameters:
bPushed true to set the color in the pushed-down state, false to set the color in the normal state
nColor new button color, such as Color.WHITE
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setCategoryText ( CharSequence  categoryText  ) 

Set application category

Parameters:
categoryText new category
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setCategoryTextColor ( int  nColor  ) 

Set the color of the application category (defaults to the style's category color)

Parameters:
nColor new text color, such as Color.WHITE
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setContentBackgroundColor ( int  nColor  ) 

Set background color for the content (defaults to the style's background color)

Parameters:
nColor new background color, such as Color.BLUE
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setIconBorderColor ( int  nColor  ) 

Set color for the border around the app's icon (defaults to the style's app icon border color)

Parameters:
nColor new border color, such as Color.BLACK
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setOnAssetsReceivedListener ( AFAdSDKSashimiAssetsReceivedListener  listener  ) 

Set display listener

Parameters:
listener new display listener for this ad
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setOnClickListener ( AFAdSDKSashimiClickListener  listener  ) 

Set click listener

Parameters:
listener new display listener for this ad
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setOnDisplayListener ( AFAdSDKSashimiDisplayListener  listener  ) 

Set display listener

Parameters:
listener new display listener for this ad
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setPriceBackgroundColor ( int  nColor  ) 

Set background color for the price tag (defaults to the style's price tag color)

Parameters:
nColor new background color, such as 0xff35bd7a
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setPriceText ( CharSequence  priceText  ) 

Set application's price

Parameters:
priceText new price
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setPriceTextColor ( int  nColor  ) 

Set the color of the application's price (defaults to the style's price color)

Parameters:
nColor new text color, such as Color.WHITE
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setStyleMode ( AFAdSDKSashimiStyleMode  styleMode  ) 

Set style mode

Parameters:
styleMode new style mode, such as AFAdSDKSashimiMinimalStyleModeLight
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setTaglineText ( CharSequence  taglineText  ) 

Set application tagline

Parameters:
taglineText new tagline
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setTaglineTextColor ( int  nColor  ) 

Set the color of the application tagline (defaults to the style's tagline color)

Parameters:
nColor new text color, such as Color.WHITE
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setTitleText ( CharSequence  titleText  ) 

Set application title

Parameters:
titleText new title
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.setTitleTextColor ( int  nColor  ) 

Set the color of the application title (defaults to the style's title color)

Parameters:
nColor new text color, such as Color.WHITE
void com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.trackDismissal ( boolean  bByUser  ) 

Track dismissal

Parameters:
bByUser true if dismissed by the user hand, false if dismissed automatically

Member Data Documentation

final String com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.CLASS_TAG = "AFAdSDK.AFAdSDKSashimiView" [static, package]

Tag for logging

Ad being presented

AFAdSDKPrivateAdDisplayEvents com.appsfire.adUnitJAR.sdk.AFAdSDKSashimiView.m_adDisplayEvents [package]

Internal ad display events interface

Icon asset

Screenshot asset

Assets received listener for this ad, null for none

true if assets have been received yet

true if ad display has been notified yet

Click listener for this ad, null for none

Application context

Display listener for this ad, null for none

Timer for checking for impressions

AppID for the ad being presented

Campaign ID for the ad being presented

Ad type

Current state for checking for an impression

Callback for getting the size of the sashimi view from the app

App category in the ad

App description in the ad

App name in the ad

App package name

App price in the ad

Zone ID


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations