OneSignal Push Notification - Android 13

Hello,

I have an legacy project in ionic2 and with the recent changes by google, which forces to put at least target-version 31, the notifications do not arrive on android 13.

I have been looking at this one signal link (Android 13 Push Notification Developer Update Guide), but I have very old dependencies and I don’t know if I can do what it indicates …

Any ideas?

Thanks.

Hi @Hills90210 ,

Thanks for answering. I need use OneSignal…
I don’t know the project very well yet and I have to touch as little as possible to avoid creating errors.

TBH It will be very difficult to debug your ionic 2 app since ionic 2 is very old. There are alot of breaking changes that will effect your app. And also without some project that can recreate the scenario, it will be near impossible to help. Good luck!

I’ve been using ionic for a short time…
What is the difference between these 2 sentences:

import OneSignal from “ionic-native”;
import OneSignal from ‘onesignal-cordova-plugin’;

Thanks

1st: imports helper functions to make simple the use of the cordova plugin
2nd: imports the actual plugin.

Ok, thanks for the clarification.

The problem I have is that when I try to upload the compileSDK version, I get java errors.
Currently, the project is on android 9 platform. If I change to 11 and install java 11, I get many errors…

Apart from praying… what would you advise me? platform up? keep the one I have and try to play with the onesignal plugins to see if I can get the notification to android 13 devices??

Do you think ionic2 can do android11 and java 11 platform or does it have some limitation that I don’t know about?

thank you

Lol. I would advise to create a new project in ionic 6, and migrate over your code, and at the same time, change the cordova plugins for capacitor ones.

I don’t think the onesignal will work properly because a lot of dependencies have been updated to new versions. If you need to be on android 13, that require A LOT of things be to upgraded. I believe your going to waste a lot of time trying to figure this out. It would be quicker to just create a new project with ionic 6 and move stuff over.

Thank you! I’ll take it into account (as soon as I can, I’ll get on with it)

Finally I used the onesignal-cordova-plugin directly instead of accessing it via ionic-native. I updated the onesignal-cordova-plugin, changed the project target to 33 and updated the calls to OneSignal… and the notifications come… but as you indicated before, more problems have appeared… :frowning:

Now access to the gallery to select an image doesn’t work… I’ll create a new question in the forum (Camera plugin - Android target 33) if you can think of how to fix it, you’re welcome :slight_smile:

Many thanks for everything

Hi @shaappdeveloper
can you share the steps what are you taken, am facing same kind of issue.
Thanks

Hi, @Rajapandi755

Sorry, I didn’t see this message.

could you advance?

I don’t quite remember the steps I took, but if you still get this error, tell me and I’ll try to refresh my memory.

Greetings