1

I want to know if i can implement other ad networks like adcolony in my codename one app using the adservice/ads component or any other method. Thanks all

rockspetre
  • 325
  • 1
  • 7

1 Answers1

0

You need to integrate the ad provider in a similar way to the flurry, admob interstitial ads etc.

See samples here: https://www.codenameone.com/cn1libs.html

And the 3rd party library integration tutorial here: https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-1.html

There is a more up to date version of that tutorial in the developer guide.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • Thanks for your answer,it really gave me direction. One problem though, i discovered I need to add hints to the android manifest.Please how do I do that in codename one – rockspetre Oct 26 '16 at 14:41
  • I saw instructions like – rockspetre Oct 26 '16 at 14:42
  • Next, copy and paste the following three activity definitions just before the end application tag near the bottom: – rockspetre Oct 26 '16 at 14:42
  • Use build hints for that: https://www.codenameone.com/manual/advanced-topics.html e.g. android.xapplication can inject into the manifest at the bottom as described here. – Shai Almog Oct 27 '16 at 02:28
  • I just followed the instructions, but on building I see this error – rockspetre Oct 27 '16 at 13:15
  • /tmp/build8407058777144396115xxx/MyApplication/src/main/java/com/mycompany/myapp/myaddImpl.java:2: error: package com.jirbo.adcolony does not exist import com.jirbo.adcolony.*; ^ /tmp/build8407058777144396115xxx/MyApplication/src/main/java/com/mycompany/myapp/myaddImpl.java:6: error: cannot find symbol AdColony.configure(this,"version:2.1,store:google","appbbd19fddafa443dbb7","Ad Zone #1"); – rockspetre Oct 27 '16 at 13:15
  • How did you add the jar/aar file? Did you place it under the native/android directory? – Shai Almog Oct 28 '16 at 02:20
  • Yes sir. I did that – rockspetre Oct 28 '16 at 07:11
  • What files did you place under the native/android directory? What build hints? Can you link to the adcolony setup instructions? – Shai Almog Oct 29 '16 at 01:10