1

Proceedings:

  • I am using push notifications to send message

  • Device is getting registered in Web-Engage

  • When I send a push notification to a device, Status on the console is seen as 'ENDED'

  • Finally push notification is not received on device

Error on Console:

APP_ID_MISMATCH

Manifest web-engage code:

    <receiver
            android:name="com.webengage.sdk.android.WebEngagePushReceiver"
            android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE"/>

            <category android:name="${applicationId}"/>
        </intent-filter>
    </receiver>

    <service android:name="com.bakmi.app.service.MyFirebaseMessagingService">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT"/>
        </intent-filter>
    </service>

    <meta-data
            android:name="com.webengage.sdk.android.project_number"
            android:value="$102353245239034"/>
    <meta-data
            android:name="com.webengage.sdk.android.key"
            android:value="@string/ACCOUNT_ID"/>


    <meta-data
            android:name="com.webengage.sdk.android.auto_gcm_registration"
            android:value="true"/>
    <meta-data
            android:name="com.webengage.sdk.android.location_tracking"
            android:value="false"/>
    <meta-data
            android:name="com.webengage.sdk.android.debug"
            android:value="true"/>

    <service android:name="com.webengage.sdk.android.ExecutorService"/>
    <service android:name="com.webengage.sdk.android.EventLogService"/>

    <receiver
            android:name="com.webengage.sdk.android.WebEngageReceiver"
            android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
            <action android:name="com.webengage.sdk.android.intent.ACTION"/>

            <category android:name="com.bakmi.loyalty"/>
        </intent-filter>
    </receiver>
    <receiver
            android:name="com.webengage.sdk.android.InstallTracker"
            android:exported="true">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER"/>
        </intent-filter>
    </receiver>
Ashwin
  • 7,277
  • 1
  • 48
  • 70
Devrath
  • 42,072
  • 54
  • 195
  • 297

1 Answers1

2

APP_ID_MISMATCH is fired in one of the two cases:

1. If the package name of the receiving app is not the one to which the push was sent from our server, i.e. your app's package-name is different from the package-name entered in WebEngage dashboard.

2. If the GCM/FCM token to which the push was sent is not tied to the server key i.e. sever key entered in WebEngage dashboard is not from the GCM/FCM project which is integrated in the App.

Apart from this, your FCM push integration seems to be mixed up with GCM push integration.

It is recommended to use FCM for push notifications and remove the following GCM related tags from your AndroidManifest.xml file.

<!-- remove these tags
<receiver
        android:name="com.webengage.sdk.android.WebEngagePushReceiver"
        android:permission="com.google.android.c2dm.permission.SEND">
    <intent-filter>
        <action android:name="com.google.android.c2dm.intent.RECEIVE"/>

        <category android:name="${applicationId}"/>
    </intent-filter>
</receiver>

<meta-data
        android:name="com.webengage.sdk.android.project_number"
        android:value="$102353245239034"/>

<meta-data
        android:name="com.webengage.sdk.android.auto_gcm_registration"
        android:value="true"/>
-->
Ashwin
  • 7,277
  • 1
  • 48
  • 70