Giter Club home page Giter Club logo

classic-meme-stickers's Introduction

Classic Meme Stickers app

This app is based on the official Repository of Whatsapp - https://github.com/WhatsApp
it's one of my personal favourite, simply perfect for the meme lovers.
I made this app for the purpose of inserting and testing Admob ads. and Firebase analytics.

Screenshots

           

Simple Banner and Interstitial ads Methods

Banner ad Method in Activity.java

     public void displaybanner() {
            MobileAds.initialize(this, initializationStatus -> {
            });
            AdView mAdView = findViewById(R.id.adView);
            // AdResources adResources = new AdResources();

            // https://developers.google.com/admob/android/banner
             mAdView.loadAd(new AdRequest.Builder().build());
         }

Banner ad Layout in Activity.xml

     <com.google.android.gms.ads.AdView
            android:id="@+id/adView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:foregroundGravity="center"
            ads:adSize="BANNER"
            ads:adUnitId="@string/admob_banner_id"/>

Interstitial ad Method to load ad in Activity.java

    public void initInterstitial() {
        MobileAds.initialize(this, getString(R.string.admob_app_id));
        AdRequest adIRequest = new AdRequest.Builder().build();

        // Prepare the Interstitial Ad Activity
        interstitial = new InterstitialAd(this);

        // Insert the Ad Unit ID
        interstitial.setAdUnitId(getString(R.string.admob_interstitial_id));

        // Interstitial Ad load Request
        interstitial.loadAd(adIRequest);
    }

Interstitial ad Method to display ad in Activity.java

    public void displayInterstitial()
    {
        // If Interstitial Ads are loaded then show else show nothing.
        interstitial.setAdListener(new AdListener() {
            public void onAdLoaded() {
                if (interstitial.isLoaded()) {
                    interstitial.show();
                }
            }
        });
    }

Test ad IDs in strings.xml

    <string name="admob_app_id" translatable="false">ca-app-pub-3940256099942544~3347511713</string>
    <string name="admob_banner_id" translatable="false">ca-app-pub-3940256099942544/6300978111</string>
    <string name="admob_interstitial_id" translatable="false">ca-app-pub-3940256099942544/1033173712</string>

Connect with me:

instagram  stack-overflow  linkedin  twitter  facebook  reddit 

classic-meme-stickers's People

Contributors

pavanpatil45 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

reyadrahman

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.