Description
I am Using flutter one signal package 3.5.4
everything was working Perfectly until i upgraded flutter to version 3.27.4
Now I Can no Longer build my app
using Flutter bulid apk or build appbundle results in an error message
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':onesignal_flutter:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR: G:\Nxt-Level\Mobile Apps\hatrick\build\onesignal_flutter\intermediates\merged_res\release\values\values.xml:2657: AAPT: error: resource android:attr/lStar not found.
- Upgrading to version 5.2.9 Solves the Problem but
it creates another one ( Which is the main reason why i was using the 3.5.4 version) and the problem is
if i received a notification while the app is not open (completely closed) upon clicking i expect the app to wake and open
but it doesn't and i need to click on the notification once again
`dart
initOneSignal() {
OneSignal.Debug.setLogLevel(
OSLogLevel.error,
);
OneSignal.initialize (AppConstants.oneSignalAppID);
OneSignal.Notifications.requestPermission(true);
}
setupNotification(BuildContext context) {
OneSignal.Notifications.addClickListener((openedResult) {
PodcastEntity podcastEntity = PodcastModel.fromJson(
jsonDecode(
openedResult.notification.additionalData!["podcast"],
),
).toEntity;
context.read().add(
NotificationClickedEvent(
entity: podcastEntity,
),
);
});
}
`
Activity
nan-li commentedon Feb 13, 2025
Hi @tazy-dev, the
android:attr/lStar
issue looks related to some compileSdk versions. I recommend using v5.x.x of this SDK.Are you seeing this on Android, iOS, or both?
tazy-dev commentedon Feb 14, 2025
For now Iam only developing it for android
So yeah only android...
Strangely as I said before when I was working with v 3.5.4 didn't have this problem...
But now it's happening and I don't know why
Clicking on a notification when app is off won't wake the application and open the notification
And clicking on the notification again is needed
nan-li commentedon May 8, 2025
Hi @tazy-dev, we have found that there are some Samsung or Redmi devices that will not open the app on a notification click. Is your device a Samsung or Redmi device? If so, we have resolved the issue and it will be available in the next release.
tazy-dev commentedon May 8, 2025
@nan-li
Yeah IAM using redmi and my colleague(who is doing the testing with me use Samsung)
I actually solved the issue using some turnaround fix but
... That is a very good news ...
Thanks a lot for your hard work ❤️
nan-li commentedon May 20, 2025
Great to hear you resolved already, we released the fix in Release 5.3.2 if you want to test it out. Otherwise, I will close out this ticket.
Please reach out with any further issues or questions.