-
Notifications
You must be signed in to change notification settings - Fork 229
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
[Feedback]: Migration guide from 3.5.1 to 5.0.0 #711
Comments
Here is the migration guide: https://github.com/OneSignal/OneSignal-Flutter-SDK/blob/user_model/main/MIGRATION_GUIDE.md |
@petodavid okay, thanks. But I can't see anywhere what should I replace these methods:
|
Please update docs and example
is necessary for iOS to get Pod installed |
Thank you for the feedback we will work on clarifying the migration steps! |
I have the same case like yours, did you find any solution ? |
@wahyu-handayani no, I'm still using 3.5.1 version |
@Fudal @wahyu-handayani change |
Hi this should help you to get started Onesignal V5.0.0 if (kDebugMode) {
OneSignal.Debug.setAlertLevel(OSLogLevel.none);
OneSignal.Debug.setLogLevel(OSLogLevel.verbose);
} else {
OneSignal.Debug.setAlertLevel(OSLogLevel.none);
OneSignal.Debug.setLogLevel(OSLogLevel.none);
}
OneSignal.initialize(oneSignalAppId); //init with your appid
OneSignal.Location.setShared(false); //avoid location sharing
OneSignal.Notifications.addForegroundWillDisplayListener((event) {
});
OneSignal.Notifications.addPermissionObserver((state) {
//log.i(text: 'Accepted Onesignal permission: $state');
});
OneSignal.InAppMessages.addWillDisplayListener((event) {
//log.i(text: 'inAppMessage ${event.message}');
});
OneSignal.Notifications.addClickListener((event) {
//var json = action.jsonRepresentation();
var clickName = event.result.actionId;
var clickURL = event.notification.launchUrl;
var title = event.notification.title;
var body = event.notification.body;
...
} |
I try to install onesignal using this version, may I take a look your |
Sure, here is
here
|
@wahyu-handayani No problem ;) |
Thank you so so sooooooooo much @Fudal for your help, I am still strugling to fix one error left, your helps really makes my day |
I still have problem with android background notification, don't know why |
Please update migration guide as described on the comment reference. All of these methods are missing without any replacement instruction.
|
I have yet to get iOS to finish building using this guide or any of the pending PR changes to it. |
@emawby We are still waiting for more information about right migration from 3.5.1 version. |
Deprecation would be nice first. Throwing braking changes randomly to a product is a weak move NGL. |
how can i fix this? The getter 'shared' isn't defined for the type 'OneSignal'. |
How do I disable the foreground notifications in the new SDK?
In the new SDK |
Same problem here, there is |
How to retrieve tags? |
Hi all, I apologize we don't have a direct v3 -> v5 migration guide yet showing the appropriate replacements. All available methods of the major release are outline here. @tovidd is correct about the methods and the replacement for To address this comment
The @rignaneseleo you can call @nandakista Can you tell me more about this issue you are running into? |
How to call |
Login method is not working instead of setExternalUserId. I don't know what it does but nothing happens. Android/ios. This is important bug |
Hi @shanelau I apologize for the delay, we have an example in the migration guide on the Notification Will Display Listener:
|
Hi @bugrevealingbme, Can you share more details about Login method is not working? |
The problem was with me, I apologize for the misinformation. Externally, how do I check if a notification is clicked when the app is closed? There is not a document about it |
Nice work. It works on onesignal_flutter: ^5.1.0 |
did u fine a solution? |
Where is postNotification method ?
any solution to post a notification from version 5 ? |
same problem, any solution? |
My understanding is that the method was removed partly for security reasons, since the SDK could be used to send notifications to other users. In this case, the team recommends using the REST API instead. |
I'm going to close this issue now but will encourage any users who have similar questions about the migration guide to open a separate issue per question. Thanks |
What's on your mind?
We need migration guide from 3.5.1 to 5.0.0.
A lot of methods have been added or changed. The version jump itself testifies to this, but no migration guide has been presented to us, so users are confused.
Code of Conduct
The text was updated successfully, but these errors were encountered: