How can I get Context of a monkey app ?

Monkey Targets Forums/Android/How can I get Context of a monkey app ?

FelipeA(Posted 2013) [#1]
I have an ad module I must add to my game. To initialize it i have to pass the game context:

public static boolean initialize(Context context)


I am using:

AdInitializer.initialize(BBAndroidGame._androidGame._activity.getApplicationContext());



But I keep getting this error:

E/AndroidRuntime(20613): FATAL EXCEPTION: GLThread 5233
E/AndroidRuntime(20613): java.lang.NoClassDefFoundError: com.cellfish.ads.R$bool
E/AndroidRuntime(20613): 	at com.cellfish.ads.user.UserProfileInfo.generateUserInfo(UserProfileInfo.java:100)
E/AndroidRuntime(20613): 	at com.cellfish.ads.user.User.initializeUser(User.java:45)
E/AndroidRuntime(20613): 	at com.cellfish.ads.AdInitializer.initialize(AdInitializer.java:83)
E/AndroidRuntime(20613): 	at com.cellfish.poussinpiou.MarketAndroid.Init(MonkeyGame.java:1404)
E/AndroidRuntime(20613): 	at com.cellfish.poussinpiou.c_Memory.p_Render(MonkeyGame.java:3624)
E/AndroidRuntime(20613): 	at com.cellfish.poussinpiou.c_GameMemory.p_OnRender(MonkeyGame.java:2797)
E/AndroidRuntime(20613): 	at com.cellfish.poussinpiou.c_GameDelegate.RenderGame(MonkeyGame.java:3732)
E/AndroidRuntime(20613): 	at com.cellfish.poussinpiou.BBGame.RenderGame(MonkeyGame.java:565)
E/AndroidRuntime(20613): 	at com.cellfish.poussinpiou.BBAndroidGame.onDrawFrame(MonkeyGame.java:1245)
E/AndroidRuntime(20613): 	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
E/AndroidRuntime(20613): 	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)


I am not very good with android stuff as you can see, so I hope someone can help me.

Thanks!


FelipeA(Posted 2013) [#2]
Apparently this error was caused because there is no activity for com.cellfish.ads. ( I hope I am saying it correct ).

How can I add a new activity for that?

Please help!