So you wanted to create an app using Jetpack Compose with AdMob. What’s the easiest way?

Prerequisite:

  1. Setup your AdMob account https://developers.google.com/admob/android/quick-start
  2. Setup AdMob dependencies in your Android app project

I. XML Setup

  1. Create an empty activity (eg. MainActivity.kt & activity_main.xml)
  2. Implement this layout in your XML file:
  • In activity_main.xml we put…

Step 1. Implement dependency

  1. Add mavenCentral() on build.gradle (project level)

2. Implement the dependency on build.gradle (app level) . Check the latest version in the repository

Step 2. Add internet permission

In your app’s AndroidManifest.xml add the internet permission inside the <manifest> tag (preferably, place it above the <application> tag):

An application can have multiple threads, but the most important thread is the UI Thread / the main thread which is created when an application launched.

To simplify, the main thread will be the one who’s responsible for rendering what you see, the user interface, and the possible interaction between…

An interface is like an abstract class, the difference is that an interface cannot store state.

Interface Declaration

How to use Interface

MJ Manaog

Android Developer | Newbie

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store