Skip to content

Push notifications not working for Android #87

@lippytak

Description

@lippytak

Describe the bug
I'm unable to get push notifications working on Android. I'm guessing this is a config/setup issue, but since this issue has come up a few times I was hoping to get it working and then contribute better instructions to this repo.

To Reproduce

  1. Install and configure @capacitor/push-notifications
  2. Enable Cloud Messaging API in Firebase (legacy) and add the Server key to Intercom (Settings > Install > Android > Push)
  3. Install and configure this plugin
  4. Add app code:
    import { Intercom } from '@capacitor-community/intercom';
    import { PushNotifications } from '@capacitor/push-notifications';
    PushNotifications.requestPermissions();
    PushNotifications.register();
    Intercom.registerUnidentifiedUser();
    Intercom.displayLauncher();
    
  5. Launch app > send Intercom message > close the app > reply to the message from the Intercom Inbox

Expected: Receive a push notification on the device after ~10 seconds.

Result: Nothing. The message comes through as expected if you resume the app.

Additional context

  • I confirmed the device/app can receive push notifications via a manual Firebase Cloud Messaging notification to the registration token
  • Push works on iOS as expected
  • Confirmed the app has notification permissions enabled
  • Tested on multiple devices with the app installed both via Android Studio and via Internal app sharing on the Play Store

Platforms:

  • OS: Android, various devices/versions

Any help greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions