Giter Site home page Giter Site logo

ti.dfp's Introduction

DFP Module

Description

This is a Titanium Mobile module for displaying DFP ads in your app. Jason Priebe started with Appcelerator's admob module, followed a few things that Wienke Giezeman did to add DFP support, updated to the latest Google Mobile Ads SDK and Google Play Services, and then brought the APIs for iOS and android into sync.

Quick Start

Android: add this to your tiapp.xml (otherwise the app won't start)

<manifest>
    <application>
        <!-- Sample AdMob app ID: ca-app-pub-3940256099942544~3347511713 -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>
</manifest>

Installation

ti.dfp's People

Contributors

darknos avatar ddyy avatar ianwelsh avatar jei avatar jpriebe avatar m1ga avatar timanrebel avatar tylerzubke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ti.dfp's Issues

Richmedia ads

Hi, do you plan to support richmedia (Video and HTML5 ads) and new ad sizes in future releases?

Is 300x250 ad size currently supported on the current release of this module?

Thanks in advance
Pablo

[iOS] banner from DFP not aligned correctly

When serving a banner directly from DFP, all banners are aligned incorrectly. There's a padding on the left and top.

image

image

In both cases the banner view is positioned fixed, bottom 0, left 0, right 0. Please mail me for a test ad-unit that demonstrates the issue.

java.lang.NoClassDefFoundError

Hi,

I got this exception when using calling ti.dfp's createView() on Android

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/ads/doubleclick/PublisherAdView

I assume this is because we are meant to include the native DFP SDK's jar ourselves? If so, which directory should put the jar? I can't find anything in ti.dfp doc/readme.

Thanks

Hi. I am trying to compile and I get the following errors (1st for device, 2nd for simulator).

[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/InBusiness.build/Debug-iphoneos/InBusiness-universal.build/Objects-normal/armv7/InBusiness normal armv7
[ERROR] : Ld build/InBusiness.build/Debug-iphoneos/InBusiness-universal.build/Objects-normal/arm64/InBusiness normal arm64
[ERROR] : (2 failures)
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess. (/Users/mmassalas/.appcelerator/install/4.1.2/package/node_modules/appc-cli-titanium/plugins/run.js:84:66)
at ChildProcess.emit (events.js:117:20)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)


[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/InBusiness.build/Debug-iphonesimulator/InBusiness-universal.build/Objects-normal/x86_64/InBusiness normal x86_64
[ERROR] : (1 failure)
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess. (/Users/mmassalas/.appcelerator/install/4.1.2/package/node_modules/appc-cli-titanium/plugins/run.js:84:66)
at ChildProcess.emit (events.js:117:20)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)

Expandable ads

Hi,

We are having an issue whereby when clicking an expandable ad, instead of getting maximized to take up the full screen, it's instead getting maximized within a small view (see screenshot below).

ad_banner1

A couple of questions:

  1. Has anyone encountered a similar issue?
  2. Do you know if this is caused by this module or caused by other things (e.g. the native DFP SDK used by the module)?

Thanks

Interstitial example?

Can you provide an interstitial example? I tried using "dfp.createInterstitialView" with no luck.
Thanks

Can't compile source module

For some reason I get this error when I try to build to module:

Producing [ModuleName]Bootstrap files using /Users/arjanbrinkman/Downloads/ti.dfp-master 2/android/build/generated/json/org/appcelerator/titanium/bindings/dfp.json
Generating BootstrapJS.cpp from bootstrap.js
Running the stock Android NDK ndk-build
[INFO] Starting directory: /Users/x/Downloads/ti.dfp-master 2/android/lib
[INFO] New directory: /Users/x/Downloads/ti.dfp-master 2/android/build/generated
[ERROR] Failed to run ndk-build
[ERROR]
[ERROR] /Users/x/Documents/Android/android-ndk-r12b/build/core/build-local.mk:158: *** Android NDK: Aborting. . Stop.

Command I used: appc ti build -p android --build-only
All paths in build.properties are valid.

Cannot get it to work

I'm trying to add the example you give in this module to my application, however I'm getting the following exception:

10-20 16:51:48.163: W/System.err(30568): java.lang.NullPointerException
10-20 16:51:48.163: W/System.err(30568): at ti.dfp.ViewProxy.requestAd(ViewProxy.java:37)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)
10-20 16:51:48.163: W/System.err(30568): at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:152)
10-20 16:51:48.163: W/System.err(30568): at android.os.Handler.handleCallback(Handler.java:733)
10-20 16:51:48.163: W/System.err(30568): at android.os.Handler.dispatchMessage(Handler.java:95)
10-20 16:51:48.163: W/System.err(30568): at android.os.Looper.loop(Looper.java:136)
10-20 16:51:48.163: W/System.err(30568): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)

Can you please guide me to a solution?

Thanks

NSCalendarsUsageDescription and NSBluetoothPeripheralUsageDescription

Got following from Apple:

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCalendarsUsageDescription key with a string value explaining to the user how the app uses this data.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothPeripheralUsageDescription key with a string value explaining to the user how the app uses this data.

and found this:
http://googleadsdeveloper.blogspot.com/2016/09/use-google-mobile-ads-sdk-7110-to.html

bannerview in a listView

Hi Jason, we're trying to implement a bannerview in a listView. Do you think this is possible?

We've tried to add it to the header/footerview, but this view won't accept Ti.UI.SIZE for example. Best scenario would be if we could add it between the listView items, on position X.

Any ideas are welcome :-)

Create View is causing app to crash

Hi,

I am using your app.js example and when I call createView I am getting the following error:

"Could not find class 'com.google.android.gms.ads.doubleclick.PublisherAdView', referenced from method ti.dfp.View.createView"

Can I get some help, please?

Here is a more complete log:

[ERROR] : dalvikvm: Could not find class 'com.google.android.gms.ads.doubleclick.PublisherAdView', referenced from method ti.dfp.View.createView
[WARN] : dalvikvm: VFY: unable to resolve new-instance 1490 (Lcom/google/android/gms/ads/doubleclick/PublisherAdView;) in Lti/dfp/View;
[INFO] : dalvikvm: Could not find method com.google.android.gms.ads.doubleclick.PublisherAdView.destroy, referenced from method ti.dfp.View.destroy
[WARN] : dalvikvm: VFY: unable to resolve virtual method 11694: Lcom/google/android/gms/ads/doubleclick/PublisherAdView;.destroy ()V
[INFO] : dalvikvm: Could not find method com.google.android.gms.ads.doubleclick.PublisherAdView.pause, referenced from method ti.dfp.View.pause
[WARN] : dalvikvm: VFY: unable to resolve virtual method 11698: Lcom/google/android/gms/ads/doubleclick/PublisherAdView;.pause ()V
[ERROR] : dalvikvm: Could not find class 'com.google.android.gms.ads.AdSize[]', referenced from method ti.dfp.View.processProperties
[WARN] : dalvikvm: VFY: unable to resolve new-array 3021 ([Lcom/google/android/gms/ads/AdSize;) in Lti/dfp/View;
[INFO] : dalvikvm: Could not find method com.google.android.gms.ads.doubleclick.PublisherAdView.resume, referenced from method ti.dfp.View.resume
[WARN] : dalvikvm: VFY: unable to resolve virtual method 11699: Lcom/google/android/gms/ads/doubleclick/PublisherAdView;.resume ()V
[WARN] : dalvikvm: Unable to resolve superclass of Lti/dfp/View$1; (1486)
[WARN] : dalvikvm: Link of class 'Lti/dfp/View$1;' failed
[INFO] : dalvikvm: DexOpt: unable to optimize static field ref 0x1543 at 0x109 in Lti/dfp/View;.createView
[WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x413ea9a8)
[ERROR] : TiApplication: (main) [0,28255] Sending event: exception on thread: main msg:java.lang.NoClassDefFoundError: com.google.android.gms.ads.doubleclick.PublisherAdView; Titanium 3.5.0,2015/01/12 15:33,0014f83
[ERROR] : TiApplication: java.lang.NoClassDefFoundError: com.google.android.gms.ads.doubleclick.PublisherAdView

Android : Crashes in listview

Adding the module in a listview crashes the app.

Alloy.js:
DFP = require('ti.dfp');

listview.xml:
<View ns="DFP" id="dfp"/>

Putting it outside a listview works fine.

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.