Skip to content

Commit d3a7723

Browse files
author
Chris Cornell
committed
First commit of admob sample
It's rough, and needs some polish. (Better buttons, more obvious interactions, etc.) But it's there and started. Top two buttons load and display normal-sized ads, bottom two load and display full-screen ones. Using an old version of the admob API C++ api - will need to be updated.
1 parent 6cf2fdd commit d3a7723

File tree

111 files changed

+3793
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3793
-0
lines changed
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Point this to a directory containing an Android-compatible javac
6+
JAVAC_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin
7+
8+
# Compile the java files, referencing the current google play services jar.
9+
find ../../src/android_java -name "*.java" | xargs ${JAVAC_HOME}/javac -cp ../../libs/google-play-services.jar:. -d classes
10+
11+
# Jar it up, place in libs directory
12+
cd classes
13+
find . -name "*.class" | xargs jar cvf ../../../libs/gma_cpp_client.jar
14+
cd ..
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
LOCAL_PATH := $(call my-dir)
2+
include $(CLEAR_VARS)
3+
4+
MY_BASE_PATH := $(LOCAL_PATH)/../..
5+
6+
LOCAL_SRC_FILES := $(MY_BASE_PATH)/src/common/admob.cpp
7+
LOCAL_SRC_FILES += $(MY_BASE_PATH)/src/common/banner_view.cpp
8+
LOCAL_SRC_FILES += $(MY_BASE_PATH)/src/common/interstitial_ad.cpp
9+
LOCAL_SRC_FILES += $(MY_BASE_PATH)/src/common/app_android.cc
10+
11+
LOCAL_MODULE := FirebaseAdMob
12+
13+
include $(BUILD_STATIC_LIBRARY)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
for arch in armeabi armeabi-v7a arm64-v8a x86; do
4+
rm ../../libs/$arch/*.a
5+
done
6+
7+
set -e
8+
9+
ndk-build NDK_PROJECT_PATH=$(pwd) APP_BUILD_SCRIPT=$(pwd)/Android.mk APP_STL=c++_static APP_ABI="armeabi armeabi-v7a arm64-v8a x86" clean
10+
ndk-build NDK_PROJECT_PATH=$(pwd) APP_BUILD_SCRIPT=$(pwd)/Android.mk APP_STL=c++_static APP_ABI="armeabi armeabi-v7a arm64-v8a x86" APP_PLATFORM=android-9
11+
12+
for arch in armeabi armeabi-v7a arm64-v8a x86; do
13+
cp -f obj/local/$arch/*.a ../../libs/$arch
14+
done
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures

admobcpp/build/android_sample/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admobcpp/build/android_sample/.idea/compiler.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admobcpp/build/android_sample/.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admobcpp/build/android_sample/.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)