Android how can I add multiple resources to tools:keep in keep.xml?

Issue

I am using onesignal and I have 2 different sound options for notifications. However, in my keep.xml, which sound I write is the only one playing.
My keep.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources
    xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@raw/money_notification"/>

For example, in this situation my notifications only play money sound and if I change it to bird_notification, only bird sound plays. I want to add both bird_sound and money_sound to tools:keep but I could not figured out the syntax. What is the syntax for it? Thanks in advance.

Solution

You can just seperate different sound paths with comma.

tools:keep="@raw/money_notification,@raw/bird_sound,..."/>

like this.

Answered By – aoiTenshi

Answer Checked By – Candace Johnson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *