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

[Android] Push Notifications shown during app launch only. #26

Open
AzarouAmine opened this issue Feb 10, 2025 · 0 comments
Open

[Android] Push Notifications shown during app launch only. #26

AzarouAmine opened this issue Feb 10, 2025 · 0 comments

Comments

@AzarouAmine
Copy link

Hello, we're trying to use Infobip to receive push notifications but we're facing a problem with Android where the notifications are only shown during app launch. If the app is either in foreground or background we do not receive anything.

The init method resembles the following:


  Future<void> initializeInfobip() async {
    try {
        await InfobipMobilemessaging.init(
          Configuration(
            applicationCode: config.infoBipApiKey!,
            fullFeaturedInAppsEnabled: true,
            iosSettings: IOSSettings(
              notificationTypes: <String>['alert', 'badge', 'sound'],
              logging: true,
            ),
          ),
        );

        InfobipMobilemessaging.on(
          LibraryEvent.messageReceived,
          (dynamic message) {
            if (kDebugMode) {
              print('Infobip debug: Message received: $message');
            }
          },
        );
      } catch (e) {
        if (kDebugMode) {
          print('Infobip debug: Error initializing Infobip: $e');
        }
      }
  }
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

1 participant