pushy / pushy-flutter

The official Pushy SDK for Flutter apps.
Apache License 2.0
21 stars 19 forks source link

Dialog pop in IOS when app is in foreground. #55

Closed faizanShoukat55 closed 1 year ago

faizanShoukat55 commented 1 year ago

Hy Pushy! I want to remove the dialog when a notification occurs in the foreground and at the same time notification disappears from the notification list it should remain there. Just want to remove the extra dialog. Hope for the best.

pushy commented 1 year ago

Hi @faizanShoukat55, We'd be glad to assist.

To remove the popup alert on iOS when a notification is received, please find this line of code in your lib/main.dart:

Pushy.notify(notificationTitle, notificationText, data);

Replace it with the following:

// Only call Pushy.notify() on Android
if (Platform.isAndroid) {
    Pushy.notify(notificationTitle, notificationText, data);
}

Add this import statement to the top of the file:

import 'dart:io' show Platform;

Please let us know if you have any further questions or face any issues.

faizanShoukat55 commented 1 year ago

Hi @pushy Thank you its working perfect