Skip to content
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

[question]: Confused about how to use smallIcons and largeIcons #225

Closed
1 task done
crieggalder opened this issue Feb 17, 2024 · 1 comment
Closed
1 task done

Comments

@crieggalder
Copy link

crieggalder commented Feb 17, 2024

How can we help?

Hi - thanks for all your work on this package!

I was the requester who filed a ticket a while back for better Android icon support. Really nice to see it implemented--much appreciated!

I'm unclear about how to actually use the new smallIcons and largeIcons properties. Right now I have a folder of icons generated via Android Asset Studio as recommended in the OneSignal docs. This folder (res) contains a folder for each resolution with structure res/drawable-<resolution>dpi/ic_stat_onesignal_default.png, where is one of m, h, xh, xxh, xxxh.

How should I use this folder of icons with the smallIcons and largeIcons properties? Some added guidance in readme would help - I'd recommend a link to the generator and directions on how to use output with the properties.

Thanks again.

OneSignal Expo SDK version

50

Platform

Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rgomezp
Copy link
Contributor

rgomezp commented Mar 25, 2024

Expo projects get created with an assets directory. You should just be able to put them in there.

Example:

root
| - src
| --- assets
| ------ notifIcons
| --------- ic_onesignal_large_icon_default.png
| --------- ic_stat_onesignal_default.png

Then, in your plugins array:

plugins: [
    [
      "onesignal-expo-plugin",
      {
        "mode": process.env.APP_VARIANT === 'development' ? "development" : "production",
        "smallIcons": ["./src/assets/notifIcons/ic_stat_onesignal_default.png"],
        "largeIcons": ["./src/assets/notifIcons/ic_onesignal_large_icon_default.png"],
      }
    ],

@rgomezp rgomezp closed this as completed Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants