use of com.google.ads.AdRequest in project TextureViewDemo by dalinaum.
the class CameraSurfaceTextureListener method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
adContainer.addView(adView);
AdRequest adRequest = new AdRequest();
// adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(adRequest);
mCameraSurfaceTextureListener = new CameraSurfaceTextureListener(this);
mTextureView = (TextureView) findViewById(R.id.texture_view);
mTextureView.setSurfaceTextureListener(mCameraSurfaceTextureListener);
}
use of com.google.ads.AdRequest in project Klyph by jonathangerbaud.
the class AdmobBanner method loadAd.
@Override
public void loadAd(View adView) {
AdRequest ar = new AdRequest();
if (BannerAdManager.getTargetingBirthday() != BannerAdManager.NONE) {
Date date = new Date();
date.setTime(BannerAdManager.getTargetingBirthday());
ar.setBirthday(date);
}
((AdView) adView).loadAd(new AdRequest());
}
use of com.google.ads.AdRequest in project TextureViewDemo by dalinaum.
the class Canvas2Activity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
adContainer.addView(adView);
AdRequest adRequest = new AdRequest();
// adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(adRequest);
mTextureView = (TextureView) findViewById(R.id.texture_view);
mTextureView.setSurfaceTextureListener(new CanvasListener());
mTextureView.setOpaque(false);
}
use of com.google.ads.AdRequest in project TextureViewDemo by dalinaum.
the class CanvasActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
adContainer.addView(adView);
AdRequest adRequest = new AdRequest();
// adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(adRequest);
mTextureView = (TextureView) findViewById(R.id.texture_view);
mTextureView.setSurfaceTextureListener(new CanvasListener());
mTextureView.setOpaque(false);
}
use of com.google.ads.AdRequest in project TextureViewDemo by dalinaum.
the class GLTriangleActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.content);
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
final AdView adView = new AdView(this, AdSize.SMART_BANNER, "a1513f5a0d88abc");
final FrameLayout adContainer = (FrameLayout) findViewById(R.id.adContainer);
adContainer.addView(adView);
AdRequest adRequest = new AdRequest();
// adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
adView.loadAd(adRequest);
mVertices = ByteBuffer.allocateDirect(mVerticesData.length * 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
mVertices.put(mVerticesData).position(0);
mTextureView = (TextureView) findViewById(R.id.texture_view);
mTextureView.setSurfaceTextureListener(new GLSurfaceTextureListener());
}
Aggregations