Integration Fyber to cocos2d-x project
Environment
Coco2dx-x 3.10
SDKBox Installer
1.0.0.18 Install
Steps
create project
- create empty cocos2d-x project by run
cocos new -l cpp -p com.sdkbox.sample.fyber fyber
import fyber
- import fyber by run
sdkbox import fyber -p /path/to/the/empty/cocos2d-x/project
add mediation
ios
- download adcolony mediation at here
- unzip adcolony mediation
Fyber_AdColony_2.6.2-r1.zip
- drag and drop
Fyber_AdColony_2.6.2-r1.embeddedframework
to xcode project
- open integration guide and follow it's steps
- read
README.pdf
in folerFyber_AdColony_2.6.2-r1
- add required framework
android
-
download android adcolony mediation at here
-
open integration guide and follow it's steps
- unzip adcolony mediation
- copy
fyber-adcolony-2.3.6-r2.jar
toproj.android/libs
- copy
libs/armeabi/libImmEndpointWarpJ.so
toproj.android/libs/armeabi
- copy
libs/armeabi-v7a/libImmEndpointWarpJ.so
toproj.android/libs/armeabi-v7a
- download Fyber annotation jar and add to
proj.android/libs
- download Fyber annotations processor jar and add to
proj.android/libs
- create folder
proj.android/annotation_libs
- download fyber-sdk, fyber-annotation, fyber-annotations-compiler, guava, javapoet, javassist, reflections
and add to folder
proj.android/annotation_libs
- your
proj.android/annotation_libs
folder may include follow files
Eclipse Setting
Enable annotations in Eclipse
- Go to
project properties
->Java Compiler
->Annotation Processing
-> and check theEnable project specific settings
checkbox - Go to
project properties
->Java Compiler
->Annotation Processing
->Factory Path
-> and click onAdd JARs...
button and add all jars onannotation_libs
folder
-
Add
@FyberSDK
annotation to your main Activity and set up annotations on Eclipse. -
make sure
jdk 1.7
has been installed -
Preference
->Java
->Installed JREs
-
project properties
->Java Compiler
-> and make surecompiler compliance level
is1.7
-
add activity to manifest
<activity
android:name="com.jirbo.adcolony.AdColonyOverlay"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.jirbo.adcolony.AdColonyFullscreen"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
<activity
android:name="com.jirbo.adcolony.AdColonyBrowser"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
website sitting
- entery Fyber dashboard
- enable reward, institial, banner
- add Adcolony network
Compile Run
- compile and run fyber on ios by run
cocos run -p ios -s /path/to/fyer/project
- compile and run fyber on android by run
cocos run -p android -s /path/to/fyer/project
Add more mediation
- other mediation integration steps is same with Adcolony