Git Product home page Git Product logo

admob-ane's Introduction

AdMob-ANE

AdMob Adobe Air Native Extension for iOS 9.0+, Android 19+.


Much time, skill and effort has gone into this. Help support the project

paypal


Android

The ANE + Dependencies

From the command line cd into /example and run:
OSX

bash get_android_dependencies.sh

Windows Powershell

PS get_android_dependencies.ps1

The dependencies can be downloaded directly from this repo:

<extensions>
    <extensionID>com.tuarua.frekotlin</extensionID>
    <extensionID>com.google.android.gms.play-services-base</extensionID>
    <extensionID>com.google.android.gms.play-services-ads-lite</extensionID>
    <extensionID>com.android.support.support-v4</extensionID>
    <extensionID>com.google.code.gson.gson</extensionID>
    ...
</extensions>

You will also need to include the following in your app manifest. Update accordingly.

<manifest android:installLocation="auto">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <application android:enabled="true">
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
        <activity android:excludeFromRecents="false" android:hardwareAccelerated="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity
             android:name="com.google.android.gms.ads.AdActivity"
             android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
             android:theme="@android:style/Theme.Translucent" />
    </application>
</manifest>

Test Ads are included in the demo. You will need an AdMob account to deliver live ads.


iOS

The ANE + Dependencies

N.B. You must use a Mac to build an iOS app using this ANE. Windows is NOT supported.

From the Terminal cd into /example and run:

bash get_ios_dependencies.sh

The folder, ios_dependencies/device/Frameworks, must be packaged as part of your app when creating the ipa. How this is done will depend on the IDE you are using.
After the ipa is created unzip it and confirm there is a "Frameworks" folder in the root of the .app package.

You will also need to include the following in your app manifest. Update accordingly.

<InfoAdditions><![CDATA[
    <key>UIDeviceFamily</key>
    <array>
        <string>1</string>
        <string>2</string>
    </array>
    <key>MinimumOSVersion</key>
    <string>9.0</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSAllowsArbitraryLoadsForMedia</key>
        <true/>
        <key>NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
    </dict>
]]></InfoAdditions>

Test Ads are included in the demo. You will need an AdMob account to deliver live ads.


Consent SDK for GDPR

!! Important !!

Before using the consent methods:

  1. Login in to you AdMob account.
  2. Navigate to Blocking Controls > EU User Consent.
  3. Check radio for Custom set of ad technology providers.
  4. Click Select Providers.
  5. Select up to 12 providers only.

Running on Simulator

The example project can be run on the Simulator from IntelliJ using AIR 28.

Running on Device

The example project can be run on the device from IntelliJ using AIR 28.

Prerequisites

You will need:

  • IntelliJ IDEA / Flash Builder
  • AIR 29
  • Xcode 9.3
  • Xcode 9.1 for iOS Simulator
  • Android Studio 3 if you wish to edit the Android source
  • wget on OSX
  • Powershell on Windows

References

admob-ane's People

Contributors

tuarua avatar

Watchers

 avatar  avatar

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.