notifications not connecting with my app

Comments

12 comments

  • Avatar
    Max Konev

    Please specify the platform (iOS/Android) and the technology you use (Cordova/Native/Unity/etc). Thanks!

  • Avatar
    intellectlogic

    is there anyone who can help me with this issue please...not able to figure it out

  • Avatar
    Max Konev

    Please specify the platform (iOS/Android) and the technology you use (Cordova/Native/Unity/etc)? Thanks!

  • Avatar
    intellectlogic

    Hi

    M using phonegap 2.8 for adroid and notifications do come to my device but it shows app name in notification bar, one i touch on it, it does not open my app, it flickers and app does not open.

  • Avatar
    Max Konev

    Do you have this line in AndroidManifest.xml under application/activity tag?

    <intent-filter>
    <action android:name="com.pushwoosh.test.MESSAGE"/>
    <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>

    As per example here:
    https://github.com/Pushwoosh/pushwoosh-sdk-samples/blob/master/Android-Phonegap/AndroidManifest.xml

    Also in the application settings in the Pushwoosh control panel under SDK option did you select "Pushwoosh"?

  • Avatar
    intellectlogic

    Hi

    thank you i have modified manifest file as you said and it worked only for one time,but application is crashing with error Connection to the server was unsuccessful (javascript:channel).onDestroy.fire();}catch(e){console.log('exception firing destroy event from native);})

    and another problem is i can not see actual message from notification area as well as when i touch it then it does not show complete message

  • Avatar
    Max Konev

    That's weird, can you paste your AndroidManifest.xml somewhere? Also please explain a bit the second part of the message. I'm not sure I understand what is wrong with the notification itself.

  • Avatar
    intellectlogic

    Hi this is my manifest file

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.newpushwoosh" android:versioncode="1" android:versionname="1.0">
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
    

    <uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/> <uses-permission android:name="android.permission.READ_PHONE_STATE"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.RECEIVE_SMS"/> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <uses-permission android:name="android.permission.READ_CONTACTS"/> <uses-permission android:name="android.permission.WRITE_CONTACTS"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.GET_ACCOUNTS"/> <uses-permission android:name="android.permission.BROADCAST_STICKY"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>

    <permission android:name="com.example.newpushwoosh.permission.C2D_MESSAGE" android:protectionlevel="signature"/>

    <uses-permission android:name="com.example.newpushwoosh.permission.C2D_MESSAGE"/>

    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>

    <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme">

    <activity android:name="com.arellomobile.android.push.PushWebview"/>
    <activity android:name="com.arellomobile.android.push.MessageActivity"/>
    <activity android:name="com.arellomobile.android.push.PushHandlerActivity"/>
    
    <receiver
        android:name="com.google.android.gcm.GCMBroadcastReceiver"
        android:permission="com.google.android.c2dm.permission.SEND">
    <intent-filter>
        <!-- Receives the actual messages. -->
        <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
        <!-- Receives the registration id. -->
        <action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
        <category android:name="com.example.newpushwoosh"/>
    </intent-filter>
    <intent-filter>
    

    <action android:name="com.pushwoosh.test.MESSAGE"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter>

    <service android:name="com.arellomobile.android.push.GeoLocationService"/>

        <receiver android:name="com.arellomobile.android.push.AlarmReceiver">
    
    </receiver>
    
    <service android:name="com.arellomobile.android.push.PushGCMIntentService"/>
    
        <activity
            android:name="com.example.newpushwoosh.MainActivity"
            android:label="@string/app_name" 
            android:configChanges="orientation|keyboardHidden|screenSize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    

    </manifest>

    And i mean to say that i can not see actual message which is been sent from pushwoosh

  • Avatar
    Max Konev

    You should move this part:

    <intent-filter>
    <action android:name="com.pushwoosh.test.MESSAGE"/>
    <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>

    right under:

    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>

    Also it should be not com.pushwoosh.test.MESSAGE but com.example.newpushwoosh.MESSAGE

  • Avatar
    intellectlogic

    Hi

    tried it but no improvement i receive push notification alert in status bar but i can see only my app name there (no message)

    and when i tap on it, ideally it should open my app seamlessly, but it tries to do so and fail, it does not open app, just screen flickers and thats it.

    it would be really great if somebody can help me as i have tried everything i can to fix this, and i have been working on this small issue since last 5-6 days but has not found anything working, i have downgraded to 2.4 phonegap, tried up till 2.8 but not working

  • Avatar
    Max Konev

    What is you try sample application from: https://github.com/Pushwoosh/pushwoosh-sdk-samples/tree/master/Android-Phonegap

    it has the correct manifest and "ready-to-go".

  • Avatar
    intellectlogic

    Hi

    I am still getting problem in connecting from my notification message to the application.

    If the application is running in background and then i get message from pushwoosh, in this case my message is linking to app but this also happens sometimes not always, many a times i get error as APPLICATION ERROR - The connection to the server was unsuccessful(javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};)

    Can you please help my adroid manifest is same the one you have given before...

    Should i upgrade to latest phonegap version? (3.3?)

    I am at the last stage of completion of my app your help will be more than appreciated

    thanks

Please sign in to leave a comment.