Application freezes when clicking on ads
I am drawing objects in SurfaceView
, so I decided to use it RelativeLayout
to display ads. I have the following code in my method onCreate
.
v = new ViewHandler(this);
super.onCreate(savedInstanceState);
RelativeLayout layout = new RelativeLayout(this);
AdView adView = new AdView(this);
adView.setAdUnitId("MY_ID");
adView.setAdSize(AdSize.BANNER);
layout.addView(v);
layout.addView(adView);
setContentView(layout);
AdRequest request = new AdRequest.Builder().build();
adView.loadAd(request);
When I click on an ad, it freezes. I am guessing this is because the application does not have permission to open the web browser and / or is affected by my application configured in sticky immersion mode. Are there any obvious bugs in this or quick fixes?
+3
source to share
No one has answered this question yet
Check out similar questions: