AirPush ISSUE while integrating after porting from cocos2dx win32 to android

Hi i have searched a lot about this issue and cant seem to figure out the solution or find it anywhere on cocos2dx or airpush websites.
I have to integrate airpush into the game that i am creating using cocos2dx 2.0.0.
I have followed the guide to integrate airpush into android as i am currently porting only on android(havent tried ios yet)
Issue is simply this that when i follow each step to integrate airpush into android and deploy the game on Samsung Galaxy S3 it work perfectly fine
(That is how i know i have done it right).
But when i ran it on HTC Explorer and Galaxy S and an android tablet the application runs and a black screen appears for a while and then disappears.
I am attaching the logs of all the devices that I have. I have tried to figure out but since i am a newbie in Cocos2dx and game development i cant without any help from the net…
So please look into this problem and kindly guide me into the right direction.

s: i know airpush is not appreciated but its my job so… boss is always right rule applies here… :stuck_out_tongue:
Any help or guidance in this manner is highly appreciated… :slight_smile:

sorry but cant seem to attach more than 1 file so i am pasting the logs here:
GALAXY S:
11-23 18:28:19.187: D/dalvikvm(9023): Trying to load lib /data/data/com.pepper.abc/lib/libgame.so 0x40515aa0
11-23 18:28:19.226: D/dalvikvm(9023): Added shared lib /data/data/com.pepper.abc/lib/libgame.so 0x40515aa0
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 1
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 2
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 3
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 4
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 5
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 6
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 7
11-23 18:28:19.238: D/SensorManager(9023): >>>>>Num Sensor: 0
11-23 18:28:19.242: W/apk path(9023): /data/app/com.pepper.abc-1.apk
11-23 18:28:19.285: I/BugSenseHandler(9023): Registering default exceptions handler
11-23 18:28:19.289: D/BugSenseHandler(9023): Looking for exceptions in: /data/data/com.pepper.abc/files
11-23 18:28:19.289: D/BugSenseHandler(9023): Found 0 stacktrace(s)
11-23 18:28:19.296: I/webclipboard(9023): clipservice: android.sec.clipboard.ClipboardExManager@4052b738
11-23 18:28:19.378: I/System.out(9023): Exists
11-23 18:28:19.386: I/GLThread(9023): onResume tid=14
11-23 18:28:19.390: I/GLThread(9023): noticed surfaceView surface lost tid=14
11-23 18:28:19.390: I/GLThread(9023): onPause tid=14
11-23 18:28:19.390: I/Main thread(9023): onPause waiting for mPaused.
11-23 18:28:22.253: I/dalvikvm(9023): threadid=4: reacting to signal 3
11-23 18:28:22.257: I/dalvikvm(9023): Wrote stack traces to ‘/data/anr/traces.txt’

HTC EXPLORER:
11-23 18:31:40.029: D/dalvikvm(23358): Trying to load lib /data/data/com.pepper.abc/lib/libgame.so 0x40695cb8
11-23 18:31:40.059: D/dalvikvm(23358): Added shared lib /data/data/com.pepper.abc/lib/libgame.so 0x40695cb8
11-23 18:31:40.119: W/apk path(23358): /data/app/com.pepper.abc-1.apk
11-23 18:31:40.159: I/HtcTextSelection(23358): (sendOnTextChanged) stopTextSelectionMode
11-23 18:31:40.189: I/BugSenseHandler(23358): Registering default exceptions handler
11-23 18:31:40.239: D/BugSenseHandler(23358): Looking for exceptions in: /data/data/com.pepper.abc/files
11-23 18:31:40.239: D/BugSenseHandler(23358): Found 0 stacktrace(s)
11-23 18:31:40.349: D/Database(23358): dbopen(): path = /data/data/com.pepper.abc/databases/webview.db, flag = 6, cannot stat file, errno: 2,message: No such file or directory
11-23 18:31:40.349: D/Database(23358): dbopen(): path = /data/data/com.pepper.abc/databases/webview.db, mode: delete, disk free size: 26 M, handle: 0x265350
11-23 18:31:40.449: V/webviewdatabase(23358): TCP pre connection: creating table in database
11-23 18:31:40.499: D/Database(23358): dbopen(): path = /data/data/com.pepper.abc/databases/webviewCache.db, flag = 6, cannot stat file, errno: 2,message: No such file or directory
11-23 18:31:40.499: D/Database(23358): dbopen(): path = /data/data/com.pepper.abc/databases/webviewCache.db, mode: delete, disk free size: 26 M, handle: 0x27d5f8
11-23 18:31:40.589: D/skia(23358): htcFlashPlugin::htcFlashPlugin
11-23 18:31:40.589: D/qct(23358): [WebView.WebView] >> Enable Shutdown = true
11-23 18:31:40.619: D/qct(23358): [RequestQueue.ActivePool.ActivePool] >> Enable Shutdown = true
11-23 18:31:40.619: D/qct(23358): [IdleCache.IdleCache] >> IDLE_CACHE_MAX = 40
11-23 18:31:40.779: I/AirpushSDK(23358): SDK enabled: true
11-23 18:31:40.779: I/System.out(23358): Exists
11-23 18:31:40.839: D/WindowManagerImpl(23358): addView, new view, mViews[0]: com.android.internal.policy.impl.PhoneWindow$DecorView@4069dd18
11-23 18:31:40.859: D/WindowManagerImpl(23358): addView, new view, mViews[1]: android.widget.LinearLayout@406def58

SAMSUNG GALAXY S3:
11-23 18:57:08.459: E/Trace(25198): error opening trace file: No such file or directory (2)
11-23 18:57:08.519: D/dalvikvm(25198): Trying to load lib /data/data/com.pepper.abc/lib/libgame.so 0x41e53250
11-23 18:57:08.544: D/dalvikvm(25198): Added shared lib /data/data/com.pepper.abc/lib/libgame.so 0x41e53250
11-23 18:57:08.584: W/apk path(25198): /data/app/com.pepper.abc-1.apk
11-23 18:57:08.589: V/SoundPoolThread(25198): beginThread
11-23 18:57:08.589: V/SoundPoolThread(25198): run
11-23 18:57:08.669: I/BugSenseHandler(25198): Registering default exceptions handler
11-23 18:57:08.674: D/BugSenseHandler(25198): Looking for exceptions in: /data/data/com.pepper.abc/files
11-23 18:57:08.674: D/BugSenseHandler(25198): Found 0 stacktrace(s)
11-23 18:57:08.799: I/webclipboard(25198): clipservice: android.sec.clipboard.ClipboardExManager@41e7cc78
11-23 18:57:08.849: V/webkit(25198): BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {41e766a8}
11-23 18:57:08.869: D/dalvikvm(25198): GC_CONCURRENT freed 204K, 9 free 12381K/13575K, paused 16ms+12ms, total 46ms
11-23 18:57:08.884: I/AirpushSDK(25198): SDK enabled: true
11-23 18:57:08.884: I/System.out(25198): Exists
11-23 18:57:09.049: D/libEGL(25198): loaded /system/lib/egl/libEGL_mali.so
11-23 18:57:09.064: D/libEGL(25198): loaded /system/lib/egl/libGLESv1_CM_mali.so
11-23 18:57:09.069: D/libEGL(25198): loaded /system/lib/egl/libGLESv2_mali.so
11-23 18:57:09.074: D/(25198): Device driver API match
11-23 18:57:09.074: D/(25198): Device driver API version: 10
11-23 18:57:09.074: D/(25198): User space API version: 10
11-23 18:57:09.074: D/(25198): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Fri Sep 28 10:42:56 KST 2012
11-23 18:57:09.149: V/MediaPlayer-JNI(25198): native_setup
11-23 18:57:09.149: V/MediaPlayer(25198): constructor
11-23 18:57:09.149: V/MediaPlayer(25198): setListener
11-23 18:57:09.149: V/MediaPlayer-JNI(25198): setDataSourceFD: fd 69
11-23 18:57:09.149: V/MediaPlayer(25198): setDataSource(69, 27772, 1840679)
11-23 18:57:09.159: V/MediaPlayer(25198): setVideoSurfaceTexture
11-23 18:57:09.159: V/MediaPlayer(25198): prepare
11-23 18:57:09.164: V/MediaPlayer(25198): message received msg=5, ext1=0, ext2=0
11-23 18:57:09.164: V/MediaPlayer(25198): New video size 0 x 0
11-23 18:57:09.164: V/MediaPlayer(25198): callback application
11-23 18:57:09.164: V/MediaPlayer(25198): back from callback
11-23 18:57:09.164: V/MediaPlayer(25198): message received msg=1, ext1=0, ext2=0
11-23 18:57:09.164: V/MediaPlayer(25198): prepared
11-23 18:57:09.164: V/MediaPlayer(25198): signal application thread
11-23 18:57:09.164: V/MediaPlayer(25198): callback application
11-23 18:57:09.164: V/MediaPlayer(25198): back from callback
11-23 18:57:09.164: V/MediaPlayer(25198): prepare complete - status=0
11-23 18:57:09.164: V/MediaPlayer-JNI(25198): setVolume: left 0.500000 right 0.500000
11-23 18:57:09.164: V/MediaPlayer(25198): MediaPlayer::setVolume(0.500000, 0.500000)
11-23 18:57:09.164: V/MediaPlayer-JNI(25198): stop
11-23 18:57:09.164: V/MediaPlayer(25198): stop
11-23 18:57:09.164: V/MediaPlayer-JNI(25198): setLooping: 1
11-23 18:57:09.164: V/MediaPlayer(25198): MediaPlayer::setLooping
11-23 18:57:09.164: V/MediaPlayer(25198): setVideoSurfaceTexture
11-23 18:57:09.164: V/MediaPlayer(25198): prepare
11-23 18:57:09.164: V/MediaPlayer(25198): message received msg=5, ext1=0, ext2=0
11-23 18:57:09.164: V/MediaPlayer(25198): New video size 0 x 0
11-23 18:57:09.164: V/MediaPlayer(25198): callback application
11-23 18:57:09.164: V/MediaPlayer(25198): back from callback
11-23 18:57:09.164: V/MediaPlayer(25198): message received msg=1, ext1=0, ext2=0
11-23 18:57:09.164: V/MediaPlayer(25198): prepared
11-23 18:57:09.164: V/MediaPlayer(25198): signal application thread
11-23 18:57:09.164: V/MediaPlayer(25198): callback application
11-23 18:57:09.164: V/MediaPlayer(25198): prepare complete - status=0
11-23 18:57:09.164: V/MediaPlayer-JNI(25198): seekTo: 0(msec)
11-23 18:57:09.164: V/MediaPlayer(25198): back from callback
11-23 18:57:09.164: V/MediaPlayer(25198): seekTo 0
11-23 18:57:09.164: V/MediaPlayer(25198): getDuration
11-23 18:57:09.164: V/MediaPlayer(25198): message received msg=4, ext1=0, ext2=0
11-23 18:57:09.164: V/MediaPlayer(25198): Received seek complete
11-23 18:57:09.164: V/MediaPlayer-JNI(25198): start
11-23 18:57:09.164: V/MediaPlayer(25198): All seeks complete - return to regularly scheduled program
11-23 18:57:09.164: V/MediaPlayer(25198): callback application
11-23 18:57:09.164: V/MediaPlayer(25198): start
11-23 18:57:09.164: V/MediaPlayer(25198): back from callback
11-23 18:57:09.759: V/MediaPlayer(25198): isPlaying: 1
11-23 18:57:09.759: V/MediaPlayer-JNI(25198): isPlaying: 1
11-23 18:57:09.759: V/MediaPlayer-JNI(25198): pause
11-23 18:57:09.759: V/MediaPlayer(25198): pause
11-23 18:57:09.779: I/Choreographer(25198): Skipped 48 frames! The application may be doing too much work on its main thread.
11-23 18:57:09.829: I/MediaPlayer(25198): Don’t send intent. msg.arg1 = 0, msg.arg2 = 0
11-23 18:57:09.834: I/MediaPlayer(25198): Don’t send intent. msg.arg1 = 0, msg.arg2 = 0
11-23 18:57:09.834: I/AirpushSDK(25198): Display Privacy & Terms
11-23 18:57:09.879: I/webclipboard(25198): clipservice: android.sec.clipboard.ClipboardExManager@41eea4f8
11-23 18:57:09.879: V/webkit(25198): BrowserFrame constructor: this=Handler (android.webkit.BrowserFrame) {41eea0b8}
11-23 18:57:09.899: D/dalvikvm(25198): GC_CONCURRENT freed 310K, 10 free 12543K/13831K, paused 2ms+3ms, total 20ms
11-23 18:57:09.974: D/dalvikvm(25198): GC_FOR_ALLOC freed 51K, 10 free 12539K/13831K, paused 24ms, total 24ms
11-23 18:57:09.979: I/dalvikvm-heap(25198): Grow heap (frag case) to 13.458MB for 279056-byte allocation
11-23 18:57:10.009: D/dalvikvm(25198): GC_FOR_ALLOC freed <1K, 10 free 12810K/14151K, paused 31ms, total 31ms
11-23 18:57:10.109: I/GATE(25198): DEV_ACTION_COMPLETED
11-23 18:57:10.114: W/webcore(25198): skip viewSizeChanged as w is 0
11-23 18:57:10.134: D/webviewglue(25198): nativeDestroy view: 0x5759b350

I have similar problems, and I can’t find a way no initiate airpush from my MainActivity, but from the BootReceiver, Airpush can be initiated, this will not allow you to use SmartWall ads, but you can use push notification ads.

thanxks for the reply fabio… Could u kindly give an example of what you have explained above…
i am new to mobile development so i get it if i look at an example code or something… please…
:slight_smile:

This is a example form my BootReceiver class

public class BootReceiver extends BroadcastReceiver {
    public void onReceive(Context context, Intent arg1) {
        try {

            if (VERSION.SDK_INT >= 4) {
                //new Airpush(context, "APP_NUMBER", "YOUR_ID_ACCOUNT_NUMBER", false,
                    //  true, true);
                Airpush airpush=new Airpush(context);
                airpush.startPushNotification(false);
                airpush.startIconAd();

            }                       

        } catch (Exception e) {
            Log.d("ADS", "error: " + e);
        }
    }
}

Don’t forget to add the necessary code to the AndroidManifest.xml file,
To know exactly what you need to add in androidmanifest file, you need to follow the instructions in the PDF file found in Airpush site, download and follow the steps in the push notification guide.

Really appreciate the help.
Thnx alot fabio… :slight_smile: