OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
625 stars 215 forks source link

[question]: Android import issues with Notification Service Extension while migrating to v5 #834

Open TheMeanCanEHdian opened 10 months ago

TheMeanCanEHdian commented 10 months ago

How can we help?

I am attempting to migrate to v5 but running into an import issue with the notification service extension.

I am getting unresolved reference when attempting to import IDisplayableMutableNotification, INotificationReceivedEvent, and INotificationServiceExtension as shown here.

I haven't seen any migration steps for the service extension. Is there something obvious here I have likely missed? I am doing the imports in a Kotlin file but do not believe that matters here.

Here is a screenshot of a minimal version of the file that is failing.

CleanShot 2024-01-30 at 21 12 48@2x

Any help would be appreciated.

Code of Conduct

GauravMcode commented 8 months ago

@TheMeanCanEHdian Please verify that you have added one-signal dependency in your app/build.gradle file.

implementation 'com.onesignal:OneSignal:[5.0.0, 5.99.99]'

Screenshot 2024-03-29 042609

The above code fixed the import error which i was facing in mainactivity.kt