java.lang.Object |
↳ |
com.google.android.gms.ads.formats.NativeAd |
Known Direct Subclasses
|
Class Overview
An object returned for a native ad request.
Summary
Nested Classes |
class |
NativeAd.AdChoicesInfo |
An object used to represent the attribution info. |
class |
NativeAd.Image |
An object used to represent an image. |
Public Methods |
abstract
void
|
performClick(Bundle clickData)
Call when the user has clicked on the ad.
|
abstract
boolean
|
recordImpression(Bundle impressionData)
Call when the ad is first displayed.
|
abstract
void
|
reportTouchEvent(Bundle touchEventData)
Call when a touch event happens on the ad.
|
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
String
ASSET_ADCHOICES_CONTAINER_VIEW
The ad choices asset ID.
Constant Value:
"1098"
Public Constructors
Public Methods
public
abstract
void
performClick
(Bundle clickData)
Call when the user has clicked on the ad. The ad unit must be whitelisted to be able to use
this api.
Parameters |
clickData |
Bundle : bundle of the app environment when the click happens. For details to construct
the click data Bundle , see NativeAdConstants.
|
public
abstract
boolean
recordImpression
(Bundle impressionData)
Call when the ad is first displayed. The ad unit must be whitelisted to be able to use this
api.
Parameters |
impressionData |
Bundle : bundle of the app environment when the impression happens. For details to
construct the click data Bundle , see NativeAdConstants. |
Returns |
boolean |
true if the impression is recorded successfully
|
public
abstract
void
reportTouchEvent
(Bundle touchEventData)
Call when a touch event happens on the ad. The ad unit must be whitelisted to be able to use
this api. If you are interested in using this feature, reach out to your account manager.
Parameters |
touchEventData |
Bundle : bundle of touch event coordinates and duration.
Example JSON representation of touchEventData Bundle:
{
"x": "100", // The x-coordinate of the touch event relative to the window.
"y": "50", // The y-coordinate of the touch event relative to the window.
"duration_millis": "500", // The amount of millisecond the user pressed on the asset.
}
|