Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @BindView(R.id.adView) AdView mAdView;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- MobileAds.initialize(getApplicationContext(), getString(R.string.ad_unit_id));
- mAdView.setAdListener(null);
- if (!Constants.IS_FREE_VERSION) {
- mAdView.setVisibility(View.GONE);
- } else {
- mAdView.loadAd(new AdRequest.Builder().build());
- }
- }
- @Override
- protected void onDestroy() {
- super.onDestroy();
- mAdView.destroy();
- }
- @Override
- protected void onPause() {
- mAdView.pause();
- super.onPause();
- }
- @Override
- protected void onResume() {
- super.onResume();
- mAdView.resume();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement