I created an app and I have published already on Google Play Store but I didn't place ads so how can I place ads in my existing project? Look at below my project and please help me how I can add ads in my existing project/app?

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>


<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
</application>

Activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<WebView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/webview" />

MainActivity.java

package english.grammarguide01.com.englishgrammarguide;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends AppCompatActivity {

public WebView mywebview;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    mywebview=(WebView) findViewById(R.id.webview);
    WebSettings webSettings=mywebview.getSettings();
    webSettings.setJavaScriptEnabled(true);
    mywebview.loadUrl("https://englishgrammarguide1.blogspot.com/");
    //Code for opening the app
    mywebview.setWebViewClient(new WebViewClient());
}

//code for back button

@Override
public void onBackPressed() {
    super.onBackPressed();
    if (mywebview.canGoBack()) {
        mywebview.goBack();
    } else {
        super.onBackPressed();
    }

}

}

Hey @debasissarkar,

A fellow exponaut Roman Akhromieiev created a great blog post about adding AdMob into an Expo project. Take a look! https://blog.expo.io/adding-admob-to-your-expo-project-aa4e48ac848

Cheers,

Adam

1 Like

I created my project in Android Studio and I want to add AdMob ads so help me and if you can so you add Admob Ads in my project and send here. So I will copy and paste in Android Studio.

This is my app link and there is no AdMob ads in this app. Look at below link.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.