Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push Notifications Not Working on Android (Intercom SDK with Capacitor) #122

Closed
shifanpark opened this issue Feb 10, 2025 · 0 comments
Closed

Comments

@shifanpark
Copy link

shifanpark commented Feb 10, 2025

Describe the bug
I am using @capacitor-community/intercom (version 7.0.3) and have encountered
an issue where push notifications are not working on Android.

I can ensure the basic configurations are correctly configured
in below setups

  1. google-services.json is correctly placed and configured.
  2. Set up the Push Server API key with Firebase Cloud Messaging for APNs authentication key correctly.

To Reproduce
Steps to reproduce the behavior:
Below is the way I used to send the push token to the intercom

Intercom.registerIdentifiedUser({
  userId: userEmail,
  email: userEmail,
}).then(async () => {
  let permStatus = await PushNotifications.checkPermissions();

  if (permStatus.receive === 'prompt') {
    permStatus = await PushNotifications.requestPermissions();
  }

  if (permStatus.receive !== 'granted') {
    throw new Error('User denied permissions!');
  }

  await PushNotifications.register();
  PushNotifications.addListener('registration', (token) => {
    if (token) {
      Intercom.sendPushTokenToIntercom(token);
    }
  });
});

Expected behavior
Push notifications should work on Android after registering the token with Intercom.

Environment (please complete the following information):

  • Intercom SDK Version: 15.11.0
  • Capacitor Intercom Plugin: 7.0.3
  • Push Notifications Plugin: @capacitor/push-notifications
  • Android version - 14

Additional context
Could you please assist in troubleshooting this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants